Skip to content

Instantly share code, notes, and snippets.

@rduarte
Created July 17, 2009 23:00
Show Gist options
  • Save rduarte/149328 to your computer and use it in GitHub Desktop.
Save rduarte/149328 to your computer and use it in GitHub Desktop.
ricardo@local:~$ scp ~/.ssh/id_rsa.pub user@host:~/.ssh/authorized_keys
ricardo@local:~$ ssh user@host
user@host:~$ chmod 600 .ssh/authorized_keys
host site1
user username_gigante
hostname sub.dominiosemnocao.com.br
host site2
user username_maior_ainda
hostname sistemax.empresay.com.br
ricardo@local:~$ ssh-keygen -t rsa
# Generating public/private rsa key pair.
# Enter file in which to save the key (/home/ricardo/.ssh/id_rsa): [ENTER]
# Enter passphrase (empty for no passphrase): [ENTER]
# Enter same passphrase again: [ENTER]
$ cd ~
$ mkdir .ssh
$ chmod 700 .ssh/
$ touch .ssh/authorized_keys
$ chmod 600 .ssh/authorized_keys
# Antes
ricardo@local:~$ ssh [email protected]
# Depois
ricardo@local:~$ ssh site1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment