mkdir ~/.ssh/keys
ssh-keygen -t dsa ~/.ssh/keys/server.key
chmod 400 ~/.ssh/keys/server.key
scp ~/.ssh/keys/server.key.pub user@server:~/.ssh/
ssh user@server
Password:
$ cat ~/.ssh/server.key.pub >> ~/.ssh/authorized_keys
$ chmod 400 ~/.ssh/authorized_keys
$sudo vi /etc/ssh/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
Ctrl+D
$echo "alias server='user@server -i ~/.ssh/keys/server.key" >> ~/.profile
$ source ~/.profile
$ server
user@server$ logout
scp ~/hren\'.bz2 ser@server:~/ -o IdentityFile=~/.ssh/keys/server.key
О чем еще можно писать ?
|