Kreiranje para RSA ključeva
ssh-keygen -t rsa
Enter file in which to save the key (/home/k/.ssh/id_rsa): Enter passphrase (empty for no passphrase):
ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/k/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/k/.ssh/id_rsa. Your public key has been saved in /home/k/.ssh/id_rsa.pub. The key fingerprint is: 4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 [email protected] The key's randomart image is: +--[ RSA 2048]----+ | .oo. | | . o.E | | + . o | | . = = . | | = S = . | | o + = + | | . o + o . | | . o | | | +-----------------+
Kopiranje javnog ključa
sudo nano /etc/ssh/sshd_config
ssh-copy-id [email protected]
The authenticity of host '126.96.36.199 (188.8.131.52)' can't be established. RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '184.108.40.206' (RSA) to the list of known hosts. [email protected]'s password: Now try logging into the machine, with "ssh '[email protected]'", and check in: ~/.ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.