tayeh / tayeh.me

tayeh.me
https://tayeh.me
2 stars 1 forks source link

Use SSH keys for authentication #6

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

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/

bashrj commented 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

tayeh commented 3 years ago

@abuarjabashar Thanks for your reply, >>