Quantcast
Channel: Библиотека знаний
Viewing all articles
Browse latest Browse all 1318

SSH клиент / сервер - [Документация]

$
0
0

SSH клиент / сервер

Генерация ключа

$ ssh-keygen-t rsa -C"admin@d7.debian.loc"
$ ssh-keygen-t dsa -C"admin@d7.debian.loc" 
$ cat ~/.ssh/id_rsa.pub |ssh user@hostname"cat>> ~/.ssh/authorized_keys" 
$ ssh user@hostname
$ sudosed-i"s/^\#RSAAuthentication.*$/RSAAuthentication yes/g"/etc/ssh/sshd_config
$ sudosed-i"s/^\#PubkeyAuthentication.*$/PubkeyAuthentication yes/g"/etc/ssh/sshd_config
$ sudo/etc/init.d/sshd restart

Отладка подключения

ssh -vvv -o PreferredAuthentications=publickey name@host -p port
  • -o PreferredAuthentications=publickey - опции аунтефикации

Документация


Viewing all articles
Browse latest Browse all 1318