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@example.com 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
The authenticity of host '22.214.171.124 (126.96.36.199)' 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 '188.8.131.52' (RSA) to the list of known hosts. firstname.lastname@example.org's password: Now try logging into the machine, with "ssh 'email@example.com'", and check in: ~/.ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.