Open utterances-bot opened 3 years ago
I usually put my public keys in ~/.ssh/authorized_keys, enable the 'AuthorizedKeysFile' and PermitRootLogin directives in sshd_config
Then use ssh -i ~/.ssh/private_key root@'...'
But learnt something today about ssh-copy-id
, something I never used before
@abuarjabashar Thanks for your reply, >>
Use SSH keys for authentication
Set up your first SSH keys Use SSH keys for authentication without password when you are connecting to your server. simple and secure login process. To Generate a new SSH Key [root@server ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.
https://tayeh.me/posts/use-ssh-keys/