SSH: Difference between revisions

From Dev Wiki
Jump to navigation Jump to search
(Create page)
 
(Add temporary reference link)
Line 16: Line 16:
* Update the line <code>PasswordAuthentication</code> to <code>no</code>
* Update the line <code>PasswordAuthentication</code> to <code>no</code>
* Restart the service with <code>sudo service ssh restart</code>
* Restart the service with <code>sudo service ssh restart</code>
== SSH not Prompting for Password ==
https://askubuntu.com/a/419562

Revision as of 08:07, 4 October 2020

Setting up Password-less Server Credentials

This is done by passing a ssh public key to the server you wish to connect to.

First, you'll need to be able to make ssh connections with passwords. If not already enabled on the server, then enable it with the following:

  • Edit the file /etc/ssh/sshd_config
  • Update the line PasswordAuthentication to yes
  • Restart the service with sudo service ssh restart

Next, pass your public key to the server with the command:
ssh-copy-id -i <public_key_to_pass> <server_address>

Test that it works by connecting to the server with ssh. It should connect without asking for a password.

Finally, disable ssh connections with passwords to make the server more secure:

  • Edit the file /etc/ssh/sshd_config
  • Update the line PasswordAuthentication to no
  • Restart the service with sudo service ssh restart


SSH not Prompting for Password

https://askubuntu.com/a/419562