Home

OpenSSH

Downloading certificates

Counting

How to count

Using ssh-copy-id to Push Public Keys to Servers

Today at work, I needed to access a remote server via SSH. Instead of typing my password each time, I decided to use public key authentication. To do this, I needed to push my public key to the remote server using the ssh-copy-id command.

  1. Copy the public key to the remote server using ssh-copy-id:

    ssh-copy-id user@server

    Replace user with your username on the remote server and server with the server's IP address or domain name.

  2. Enter your password when prompted.

  3. Verify that you can now log in to the remote server without entering your password:

    ssh user@server

That's it! Now you can log in to the remote server securely and without having to enter your password each time.