User Tools

Site Tools


code:ssh

Setting up SSH

On the local workstation:

  • Open up Terminal.app
  • cd .ssh
  • ssh-keygen -t rsa1 (creates an RSA1 key pair for SSH protocol version 1 communication)
    • Choose default location, and leave the passphrase empty.
  • ssh-keygen -t dsa (creates a DSA key pair for SSH protocol version 2 communication)
    • Choose default location, and leave the passphrase empty.
  • ssh-keygen -t rsa (creates an RSA key pair for SSH protocol version 2 communication)
  • Copy identity.pub, id_dsa.pub and id_rsa.pub to the remote SSH server.

On the remote server:

  • cat identity.pub » ~/.ssh/authorized_keys (appends the line in the file to the end of authorized_keys, for SSH protocol version 1 communication)
  • cat id_dsa.pub » ~/.ssh/authorized_keys2 (appends the line in the file to the end of authorized_keys2, for SSH protocol version 2 communication)
  • cat id_rsa.pub » ~/.ssh/authorized_keys2
  • Make sure your .ssh directory is NOT group/world readable. (chmod -R 0600 ~/.ssh will take care of this)
  • SSH to the remote server after creating and moving your SSH keys into place. You will be prompted to accept the remote server's host key.
code/ssh.txt · Last modified: 2015/11/19 15:00 by michfiel