SSH
Create SSH keys
Section titled “Create SSH keys”ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"
ssh-keygen -t ed25519 -C "your_email@example.com"
Create reverse SSH tunnel
Section titled “Create reverse SSH tunnel”- From distant machine
ssh -R {local_machine_port}:localhost:22 {user}@{local_machine_ip}
- From local machine
ssh {distant_machine_user}@localhost -p {local_machine_port}
Redirect distant port to local machine
Section titled “Redirect distant port to local machine”- From local machine
ssh -L {local_machine_port}:localhost:{distant_machine_port} {user}@{distant_machine_ip}
Copy files
Section titled “Copy files”- From local to distant
scp {local_file_path} {user}@{distant_machine_ip}:{desired_distant_path_to_file}
- From distant to local
scp {user}@{distant_machine_ip}:{distant_path_to_file} {desired_local_path}
Remove ssh known_hosts entry
Section titled “Remove ssh known_hosts entry”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”- Setup the connection
ssh {user}@{ip} -D {local_port}
- Start chromium with the proper flag
chromium --proxy-server="socks5://localhost:{local_port}"
Forward SSH agent to remote machine
Section titled “Forward SSH agent to remote machine”- Add RSA or DSA identities to the authentication agent
ssh-add {path_to_identify:optional}
- Connect to the remote server
ssh -A {user}@{host}
- Check if it works by calling github (ur key must be known by GitHub ofc)
ssh -T git@github.com