[BSD] ssh publickey gond
Laszlo Nagy
gandalf at shopzeus.com
2009. Már. 20., P, 14:36:25 CET
> Ez alapjan a neptunus.msnet hoston kell a kovetkezoket vegigcsinalni:
>
> valaki at neptunus.msnet # cat id_neptunus_zeusd1_dsa.pub >>
> ~zeusd1/.ssh/authorized_keys
> valaki at neptunus.msnet # cat id_neptunus_shopzeus_dsa.pub >>
> ~shopzeus/.ssh/authorized_keys
>
Szerintem ezek megvoltak, de a biztonság kedvéért:
%hostname
neptunus.msnet
%whoami
shopzeus
%cd ~/.ssh
%ls
authorized_keys id_neptunus_shopzeus_dsa
id_neptunus_shopzeus_dsa.pub known_hosts
%rm *
%ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key
(/usr/local/www/vhosts/shopzeus.com/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in
/usr/local/www/vhosts/shopzeus.com/.ssh/id_dsa.
Your public key has been saved in
/usr/local/www/vhosts/shopzeus.com/.ssh/id_dsa.pub.
The key fingerprint is:
cf:62:e4:4c:e4:8d:9e:63:72:c6:86:aa:cc:d2:2b:94 shopzeus at neptunus.msnet
%mv id_dsa.pub id_neptunus_shopzeus_dsa.pub
%mv id_dsa id_neptunus_dsa
%cp id_neptunus_shopzeus_dsa.pub authorized_keys
%mv id_neptunus_dsa id_neptunus_shopzeus_dsa
%chmod 600 *
%ls -l
total 6
-rw------- 1 shopzeus www 613 Mar 20 14:57 authorized_keys
-rw------- 1 shopzeus www 668 Mar 20 14:57 id_neptunus_shopzeus_dsa
-rw------- 1 shopzeus www 613 Mar 20 14:57 id_neptunus_shopzeus_dsa.pub
Ezután bemásoltam az id_neptunus_shopzeus_dsa file-t az ubuntus gépre:
%scp id_neptunus_shopzeus_dsa gandalf at 192.168.1.104:~/.ssh
The authenticity of host '192.168.1.104 (192.168.1.104)' can't be
established.
DSA key fingerprint is e8:6b:d4:f8:de:6a:ab:8b:04:3e:c6:d1:26:78:93:20.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.104' (DSA) to the list of known hosts.
gandalf at 192.168.1.104's password:
id_neptunus_shopzeus_dsa
Végül az unbuntus gépen:
gandalf at saturnus:~$ ssh -l shopzeus neptunus_shopzeus
Password:
Nos, egyéb ötlet?
L
További információk a(z) BSD levelezőlistáról