ssh-copy-id -p port_number user@hostname
Here's how it works:
- Replace 'port_number' with the port number you want to use.
- Replace 'user' user with the username of the remote account.
- Replace 'hostname' with the hostname or IP address of the remote server.
For e.g
ssh-copy-id -p 1234 [email protected]