Ssh Config Set Key

Posted : admin On 1/1/2022

By default PasswordAuthentication is set to yes, so explicitly commenting it in /etc/ssh/sshdconfig and restart sshd has no effect. You'll need to explicitly set PasswordAuthentication no to allow only Public Key Authentication. # To disable tunneled clear text passwords, change to no here! PasswordAuthentication no PubkeyAuthentication yes. Make SSH easy by adding entries to your local SSH config file. From this file we can set useful defaults to make logging into remote servers as easy as `ssh myserver`.

Make SSH easy by adding entries to your local SSH config file. From this file we can set useful defaults to make logging into remote servers as easy as ssh myserver.In the previous video, we used this long command to login with a newly created SSH key:

KeySshSsh config set keys

Locally on my Mac, I can create/edit an ssh config file:

Add the following to mirror our long command:

Ssh Config Set Default Key

Save and exit that file, and try to login in our simpler way:

Ssh config set default key

We can use this with any SSH-based tool:

Git Config Ssh Key

See the man page of ssh to check out all the options you can use in the config file.