Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 14793  / 3 Years ago, fri, june 18, 2021, 9:56:44

How can I make ssh-copy-id use a port other than 22?



I tried it with -p but I get:



ssh-copy-id -p XXX [email protected]
Bad port 'umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys'


I know that the port is good because I'm connected to the server on that port.


More From » bash

 Answers
6

Set the port to use in ~/.ssh/config like the following:



Host secret-host.example.com
Port 2222

[#33937] Saturday, June 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
herriail

Total Points: 11
Total Questions: 122
Total Answers: 118

Location: Peru
Member since Tue, Mar 16, 2021
3 Years ago
herriail questions
Tue, May 18, 21, 02:11, 3 Years ago
Sun, Dec 12, 21, 06:06, 2 Years ago
Wed, May 24, 23, 01:42, 1 Year ago
Sun, Jan 29, 23, 00:48, 1 Year ago
;