SSH: Difference between revisions
Jump to navigation
Jump to search
Brodriguez (talk | contribs) (Create page) |
Brodriguez (talk | contribs) (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
toyes
- 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
tono
- Restart the service with
sudo service ssh restart