Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


ssh_without_a_password_using_public_private_keys

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ssh_without_a_password_using_public_private_keys [2009/02/12 11:43] juckinsssh_without_a_password_using_public_private_keys [2025/06/08 14:51] (current) juckins
Line 1: Line 1:
-======SSH / rysnc without password====== +==== SSH / rysnc without password ==== 
-make sure the same versions of ssh are on both machines (open version 3.1+ works best for HP-UX boxes) \\ + 
-need to configure client (machine connecting from) and server (machine connecting to) \\ +Make sure the same versions of ssh are on both machines. \\ 
-on client:  create dsa and rsa public and private keys with the following: \\+You need to configure both client (machine connecting from) and server (machine connecting to)\\ 
 +On clientcreate ecdsa public and private keys (optionally you can also create rsa and dsa versions) with the following: \\
 <code> <code>
 cd ~/.ssh cd ~/.ssh
 +ssh-keygen -t ecdsa -f ~/.ssh/id_ecdsa
 ssh-keygen -t rsa -f ~/.ssh/id_rsa ssh-keygen -t rsa -f ~/.ssh/id_rsa
 ssh-keygen -t dsa -f ~/.ssh/id_dsa ssh-keygen -t dsa -f ~/.ssh/id_dsa
 </code> </code>
-this creates id_dsaid_dsa.pub, id_rsa, id_rsa.pub - optionally can enter a 'passphrase' when prompted \\+This creates id_ecdsaid_ecdsa.pub, id_rsa, id_rsa.pub, id_dsa, id_dsa.pub - optionally can enter a 'passphrase' when prompted \\ 
 + 
 +From the client, copy the ssh public keys to the server using the following: 
 + 
 +  ssh-copy-id username@remote_host 
 +   
 +Follow the prompts.  If successful you should be able to ''ssh username@remote_host'' without a password now.
  
-on server: \\+To do this process manually on the server: \\
 <code> <code>
 cd ~/.ssh/ cd ~/.ssh/
 </code> </code>
-vi authorized_keys2 \\ +vi authorized_keys \\ 
-copy the id_dsa.pub and id_rsa.pub from client into authorized_keys file \\ +Copy the id_dsa.pub and id_rsa.pub from client into authorized_keys file \\ 
-make sure permissions 644 on authorized_keys \\+Make sure permissions 600 on authorized_keys \\
 Also: Also:
 <code> <code>
Line 31: Line 39:
 </code> </code>
  
-Or for Red Hat systems:+Or for RedHat systems:
 <code> <code>
 service sshd restart service sshd restart
 </code> </code>
ssh_without_a_password_using_public_private_keys.1234456994.txt.gz · Last modified: by juckins