Simplifying SSH Access with scp
When starting a new project, I often find myself frequently accessing SSH servers for deployment and various administrative tasks. Constantly entering passwords for each connection quickly becomes cumbersome. To streamline this process, I use the following command to set up passwordless SSH login:
scp ~/.ssh/id_rsa.pub deploy@url.com:~/.ssh/authorized_keys
By copying my public SSH key to the authorized_keys file on the remote server, I can log in without needing to enter my password every time. This command securely transfers my public key to the server, enabling passwordless authentication and making my workflow much more efficient.
PS. If the command doesn’t work, ensure that the specified path and file exist on the server. If they don’t, you’ll need to create them manually.