Ssh without password: Difference between revisions

From HPCwiki
Jump to navigation Jump to search
(Created page with "Secure shell (ssh) protocols can be configure to work without protocols. This is particularly helpful for machines that are used often. == Configuring ssh without password from...")
 
Line 3: Line 3:
== Configuring ssh without password from a POSIX-compliant terminal ==
== Configuring ssh without password from a POSIX-compliant terminal ==


* log into a local Linux or MacOSX computer
* Log into a local Linux or MacOSX computer
* type the following to generate the ssh key:
* Type the following to generate the ssh key:
<source lang='bash'>
<source lang='bash'>
ssh-keygen -t dsa
ssh-keygen -t dsa
</source>
</source>
* accept the default key location by pressing <code>Enter</code>.
* Accept the default key location by pressing <code>Enter</code>.
* Secure permission of your authentication keys by closing permission to your home directory, .ssh directory, and authentication files
<source lang='bash'>
chmod go-w $HOME
chmod 700 $HOME/.ssh
chmod go-rwx $HOME/.ssh/*
</source>
* Type the following to copy the key to the remote server.
<source lang='bash'>
cd ~/.ssh
scp id_dsa.pub remote_username@remote_host:/tmp
</source>

Revision as of 19:36, 24 November 2013

Secure shell (ssh) protocols can be configure to work without protocols. This is particularly helpful for machines that are used often.

Configuring ssh without password from a POSIX-compliant terminal

  • Log into a local Linux or MacOSX computer
  • Type the following to generate the ssh key:

<source lang='bash'> ssh-keygen -t dsa </source>

  • Accept the default key location by pressing Enter.
  • Secure permission of your authentication keys by closing permission to your home directory, .ssh directory, and authentication files

<source lang='bash'> chmod go-w $HOME chmod 700 $HOME/.ssh chmod go-rwx $HOME/.ssh/* </source>

  • Type the following to copy the key to the remote server.

<source lang='bash'> cd ~/.ssh scp id_dsa.pub remote_username@remote_host:/tmp </source>