Use ssh-copy-id with an OpenSSH Server Listening On a Different Port

ssh-copy-id -p <port_number> user@hostname

Here, port_number is the number of the port on which the OpenSSH server is listening, user is the username for the account on the server, and hostname is the hostname or IP address of the server.

Leave a Comment