SSH Notes

SSH Config

This file just makes some useful aliases. Put it in ./ssh Here is a sample entry:

Host mysite
 HostName xxx.xxx.xxx.xxx
 IdentityFile ~/.ssh/id_rsa
 User root

Public Key Does not Work

Run ssh with -vvvv to debug. If you see this:

debug1: Offering DSA public key: /home/chuck/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password

It means the key does not match the one on your local machine.

Copying the Key to the Remote Host

ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote-host
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