SUBSCRIBE VIA RSS


Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.

Topics

TWITTER

Stack Overflow


The old fashioned way

RECENT TUNES

August 2, 2007 – 1:15pm SSH Login without entering your password

Using an SSH key to connect to the server allows you to log in without entering your password.

To generate an SSH key on Mac OS X or Linux machines:

  • Open a Terminal window and enter:
ssh-keygen -d

Unless you set an alternative local storage location when prompted, your public key will be stored in ~/.ssh/id_dsa.pub. For increased security enter a passphrase when prompted, however this is probably not necessary unless many people use your computer.

  • At the command line enter the following and copy the output to the clipboard.
cat ~/.ssh/id_dsa.pub
  • Log in to the server.
  • Switch into the ssh directory:
cd .ssh
  • Type:
vi authorized_keys
  • Paste your public key from the clipboard, then save and exit vi.
Posted in  OS X Web Development   |  delicious  Digg

2 Responses to “SSH Login without entering your password”

  1. The “-d” shortcut does not exist in *nix systems. In general, you want to use

    ssh-keygen -t dsa

    By Rob Rosenbaum on Apr 8, 2008

  2. It seems that the proper permissions for the authorized_keys file is “644″ or “-rw-r–r–”.

    By Scott Meves on Jul 7, 2008

Post a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word