Suppose you have a SSH server ssh.example.edu with ssh port number 22222.
To copy your ssh public key to the server, run:
ssh-copy-id '-p 22222 jon@ssh.example.edu'Note the single quote is necessary.
To log in to the SSH server, run
ssh -p 22222 jon@ssh.example.eduTo copy files between your local machine and the server with scp, run
scp -P 22222 local-files jon@ssh.example.edu:~Note the "-P" option is capitalised.
References:
1. http://www.itworld.com/nls_unixssh0500506
2. http://mikegerwitz.com/2009/10/07/ssh-copy-id-and-sshd-port/
No comments:
Post a Comment