DEV Community

David Loor
David Loor

Posted on • Originally published at davidloor.com on

How to SSH login to a server without being prompted for the password

boy in white t shirt sitting on chair in front of computer

You purchased a new server, and want to SSH login into it, so you use the command ssh remote_username@server_ip_address , and you are prompted for the password of the remote_username. if you would need to enter the password a couple of times is ok, but if you need to SSH login multiple times that is a pain.

ssh-copy-id is a command that is used to install your public SSH key on a remote server. This allows you to use SSH key-based authentication to log in to the remote server without having to enter a password.

To use ssh-copy-id, you will need to have an SSH key pair. If you don’t have an SSH key pair, you can generate one using the ssh-keygen command. Once you have your SSH key pair, you can use the ssh-copy-id command to install your public key on the remote server.

The syntax of the command is as follows: ssh-copy-id remote_username@server_ip_address You will be prompted for the remote_username’s password one the last time, and after that, you won’t be prompted for the password anymore.

Example of use of the command ssh-copy-id

ssh-copy-id david@mynicesite.com
Enter fullscreen mode Exit fullscreen mode

This would install your public SSH key on the remote server at mynicesite.com, using the username “david”.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay