SSH: Difference between revisions

Content added Content deleted
m (Protected "SSH" ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite) [Delete=Allow only logged in users] (indefinite)))
Line 4: Line 4:


== Passwordless SSH Aunthentication ==
== Passwordless SSH Aunthentication ==
ssh-keygen [Press enter key 3 times]
ssh-keygen [Press enter key 3 times] # Generate SSH key pair (public + private key)
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 2222 user@example.com
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 2222 user@example.com # Copy Public key to remote server
user@example.com's password:xxxxxxxxxxx
user@example.com's password:xxxxxxxxxxx
ssh -p 2222 user@example.com
ssh -p 2222 user@example.com # Test connectivity


Alternative:
;Alternative:


Add the following to '''.bashrc''' file:
Add the following to '''.bashrc''' file: