Doing It Manually
Generate keys on local desktop:
ssh-keygen -t rsa -b 4096 -C "email@example.com"
Append public key to server “kvm-example-server.com” as firstname.lastname@example.org:~/ssh/authorized_keys
Then repeat this to create connection from email@example.com to internal account: firstname.lastname@example.org
Not you can access email@example.com from desktop over kvm-example-server.com in one cmd:
ssh -A -t firstname.lastname@example.org ssh -A email@example.com
- -A to enable agent forwarding
- -t to force a pseudo-tty to be allocated.
A Better Way
and add lines:
Host server-kvm HostName kvm-example-server.com Host server-internal ProxyCommand ssh -q server-kvm nc -q0 192.168.122.13 22
Now that the proxy command is set up, you can connect to the ‘aoraki’ host simply by typing: