How do I set up SSH public-key authentication to connect to a remote system?

How do I set up SSH public-key authentication to connect to a remote system?

If your account on the remote system doesn’t already contain a ~/.ssh/authorized_keys file, create one; on the command line, enter the following commands: mkdir -p ~/.ssh touch ~/.ssh/authorized_keysNote: If your account on the remote system already has a ~/.ssh/authorized_keys file, executing these commands will not damage the existing directory or file.On the remote system, add the contents of your public key file e.g., ~/id_rsa.pub to a new line in your ~/.ssh/authorized_keys file; on the command line, enter: cat ~/id_rsa.pub >> ~/.ssh/authorized_keys

via How do I set up SSH public-key authentication to connect to a remote system?.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s