SSH Agent Forwarding
Last modified
*nix (including OS X) Users
Copy your public key to the server
If you have the ssh-copy-id
command available (most Linux
distributions, unfortunately, not available by default on Mac OS X).
$ ssh-copy-id -i ~/.ssh/id_rsa.pub cvl_username@ece2524.ece.vt.edu
If the ssh-copy-id
command is not available you can run the
following commands instead. You will be prompted for your CVL account
password for each command.
$ cat ~/.ssh/id_rsa.pub | ssh cvl_username@ece2524.ece.vt.edu 'mkdir .ssh; cat >> .ssh/authorized_keys'
$ ssh cvl_username@ece2524.ece.vt.edu 'chmod 700 .ssh; chmod 600 .ssh/authorized_keys'
Add your key to your local SSH Agent
$ ssh-add
Connect
If everything worked, your keys should be used for authentication the next time you ssh into your shell acount
$ ssh cvl_username@ece2524.ece.vt.edu
If you used a passphrase when creating your key you will be promted to enter it.