Skip to content

SSH

Terminal window
ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
Terminal window
ssh-keygen -t ed25519 -C "your_email@example.com"
  • From distant machine
Terminal window
ssh -R {local_machine_port}:localhost:22 {user}@{local_machine_ip}
  • From local machine
Terminal window
ssh {distant_machine_user}@localhost -p {local_machine_port}
  • From local machine
Terminal window
ssh -L {local_machine_port}:localhost:{distant_machine_port} {user}@{distant_machine_ip}
  • From local to distant
Terminal window
scp {local_file_path} {user}@{distant_machine_ip}:{desired_distant_path_to_file}
  • From distant to local
Terminal window
scp {user}@{distant_machine_ip}:{distant_path_to_file} {desired_local_path}
ssh-keygen -R {hostname}

Setup a ssh socks proxy and use it with chromium

Section titled “Setup a ssh socks proxy and use it with chromium”
  1. Setup the connection
Terminal window
ssh {user}@{ip} -D {local_port}
  1. Start chromium with the proper flag
Terminal window
chromium --proxy-server="socks5://localhost:{local_port}"
  1. Add RSA or DSA identities to the authentication agent ssh-add {path_to_identify:optional}
  2. Connect to the remote server ssh -A {user}@{host}
  3. Check if it works by calling github (ur key must be known by GitHub ofc) ssh -T git@github.com