Is it possible to run ssh-copy-id on port other than 22?
Clash Royale CLAN TAG#URR8PPP
I have a server with SSH running on a non-standard port. Instead of 22, it runs on 8129. To log in, I use:
ssh -p 8129 hostname
Now, whenever I need to set up a key for password-less login, I have to copy the public key and add it to authorized_keys manually. I discovered that the command ssh-copy-id
could be used to simplify this process, but it seems like it does not have an option to specify the port of the ssh server.
Is there some way to tell ssh-copy-id
to use port 8129, or should I just forget about this command and copy/paste manually as before?
ssh
add a comment |
I have a server with SSH running on a non-standard port. Instead of 22, it runs on 8129. To log in, I use:
ssh -p 8129 hostname
Now, whenever I need to set up a key for password-less login, I have to copy the public key and add it to authorized_keys manually. I discovered that the command ssh-copy-id
could be used to simplify this process, but it seems like it does not have an option to specify the port of the ssh server.
Is there some way to tell ssh-copy-id
to use port 8129, or should I just forget about this command and copy/paste manually as before?
ssh
add a comment |
I have a server with SSH running on a non-standard port. Instead of 22, it runs on 8129. To log in, I use:
ssh -p 8129 hostname
Now, whenever I need to set up a key for password-less login, I have to copy the public key and add it to authorized_keys manually. I discovered that the command ssh-copy-id
could be used to simplify this process, but it seems like it does not have an option to specify the port of the ssh server.
Is there some way to tell ssh-copy-id
to use port 8129, or should I just forget about this command and copy/paste manually as before?
ssh
I have a server with SSH running on a non-standard port. Instead of 22, it runs on 8129. To log in, I use:
ssh -p 8129 hostname
Now, whenever I need to set up a key for password-less login, I have to copy the public key and add it to authorized_keys manually. I discovered that the command ssh-copy-id
could be used to simplify this process, but it seems like it does not have an option to specify the port of the ssh server.
Is there some way to tell ssh-copy-id
to use port 8129, or should I just forget about this command and copy/paste manually as before?
ssh
ssh
edited Jan 19 '12 at 0:16
Kevin
26.9k106199
26.9k106199
asked Jan 18 '12 at 23:29
Milan Babuškov
93721012
93721012
add a comment |
add a comment |
9 Answers
9
active
oldest
votes
$ ssh-copy-id "-p 8129 user@host"
Source: http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html
NOTE: The port must be in front of the user@host or it will not resolve
8
It's really stupid, thatssh
has syntaxssh -p 1234 user@host
,ssh-copy-id "-p 1234 user@host"
and finallyscp -P 1234 user@host
. It would be so nice to have the same syntax.
– Tombart
Feb 4 '15 at 12:58
2
@Tombart and then rsync hasrsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.
– garetmckinley
Sep 25 '15 at 4:10
1
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
FYI the full command requires the IP typed in twice, and should look something like:ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
On macOS (I am on High Sierra) the quotes are not required. ie.ssh-copy-id -p 8129 user@host
works.
– Arjun Mehta
May 21 at 15:57
add a comment |
ssh-copy-id
doesn't take any arguments that it could pass down to the underlying ssh
command, but you can configure an alias in ~/.ssh/config
.
Host myhost
HostName hostname
Port 8129
Then run ssh-copy-id myhost
.
3
This also has the benefit of removing the need for the-p
flag on regularssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.
– Warren Young
Jan 20 '12 at 14:00
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
add a comment |
As of openssh-client_6.2 there is now a dedicated port flag for the command allowing for this syntax:
ssh-copy-id -p 8129 user@example
It also added support for adding other ssh options with the -o flag.
Here's is Ubuntu's man page for the appropriate version, introduced in 13.04: http://manpages.ubuntu.com/manpages/saucy/man1/ssh-copy-id.1.html
2
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
add a comment |
A quick look at the source indicates that ssh-copy-id
appears to have no function that permits this. However, you could do something like the following instead:
ssh -p8129 user@host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_*.pub
add a comment |
This works (from here):
ssh-copy-id -i ~/.ssh/id_rsa.pub '-p 221 username@host'
add a comment |
I have always used scp
to copy it over:
scp -P 8129 ~/.ssh/id_*.pub user@host:
ssh -p 8129 user@host 'cat id_*.pub >> ~/.ssh/authorized_keys'
Though I must say, I'll probably be using the other (one-line/connection) methods if I remember them in the future. But this is another option for you.
add a comment |
On CentOS7 is just:
ssh-copy-id "-p 1234" user@host
Please take care to don't place user@host within the quotes or you'll get the following error in this distribution:
/usr/bin/ssh-copy-id: ERROR: Bad port ' 1234 user@host'
add a comment |
With my macOS, this worked.
ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port> user@host
add a comment |
I use this command:
ssh-copy-id ssh://user@ip_addr:port
Example:
ssh-copy-id ssh://root@1.2.3.4:23
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f29401%2fis-it-possible-to-run-ssh-copy-id-on-port-other-than-22%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
$ ssh-copy-id "-p 8129 user@host"
Source: http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html
NOTE: The port must be in front of the user@host or it will not resolve
8
It's really stupid, thatssh
has syntaxssh -p 1234 user@host
,ssh-copy-id "-p 1234 user@host"
and finallyscp -P 1234 user@host
. It would be so nice to have the same syntax.
– Tombart
Feb 4 '15 at 12:58
2
@Tombart and then rsync hasrsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.
– garetmckinley
Sep 25 '15 at 4:10
1
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
FYI the full command requires the IP typed in twice, and should look something like:ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
On macOS (I am on High Sierra) the quotes are not required. ie.ssh-copy-id -p 8129 user@host
works.
– Arjun Mehta
May 21 at 15:57
add a comment |
$ ssh-copy-id "-p 8129 user@host"
Source: http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html
NOTE: The port must be in front of the user@host or it will not resolve
8
It's really stupid, thatssh
has syntaxssh -p 1234 user@host
,ssh-copy-id "-p 1234 user@host"
and finallyscp -P 1234 user@host
. It would be so nice to have the same syntax.
– Tombart
Feb 4 '15 at 12:58
2
@Tombart and then rsync hasrsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.
– garetmckinley
Sep 25 '15 at 4:10
1
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
FYI the full command requires the IP typed in twice, and should look something like:ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
On macOS (I am on High Sierra) the quotes are not required. ie.ssh-copy-id -p 8129 user@host
works.
– Arjun Mehta
May 21 at 15:57
add a comment |
$ ssh-copy-id "-p 8129 user@host"
Source: http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html
NOTE: The port must be in front of the user@host or it will not resolve
$ ssh-copy-id "-p 8129 user@host"
Source: http://it-ride.blogspot.com/2009/11/use-ssh-copy-id-on-different-port.html
NOTE: The port must be in front of the user@host or it will not resolve
edited Jul 24 at 1:57
slm♦
247k66507675
247k66507675
answered Feb 25 '13 at 17:37
Jsan
1,076182
1,076182
8
It's really stupid, thatssh
has syntaxssh -p 1234 user@host
,ssh-copy-id "-p 1234 user@host"
and finallyscp -P 1234 user@host
. It would be so nice to have the same syntax.
– Tombart
Feb 4 '15 at 12:58
2
@Tombart and then rsync hasrsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.
– garetmckinley
Sep 25 '15 at 4:10
1
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
FYI the full command requires the IP typed in twice, and should look something like:ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
On macOS (I am on High Sierra) the quotes are not required. ie.ssh-copy-id -p 8129 user@host
works.
– Arjun Mehta
May 21 at 15:57
add a comment |
8
It's really stupid, thatssh
has syntaxssh -p 1234 user@host
,ssh-copy-id "-p 1234 user@host"
and finallyscp -P 1234 user@host
. It would be so nice to have the same syntax.
– Tombart
Feb 4 '15 at 12:58
2
@Tombart and then rsync hasrsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.
– garetmckinley
Sep 25 '15 at 4:10
1
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
FYI the full command requires the IP typed in twice, and should look something like:ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
On macOS (I am on High Sierra) the quotes are not required. ie.ssh-copy-id -p 8129 user@host
works.
– Arjun Mehta
May 21 at 15:57
8
8
It's really stupid, that
ssh
has syntax ssh -p 1234 user@host
, ssh-copy-id "-p 1234 user@host"
and finally scp -P 1234 user@host
. It would be so nice to have the same syntax.– Tombart
Feb 4 '15 at 12:58
It's really stupid, that
ssh
has syntax ssh -p 1234 user@host
, ssh-copy-id "-p 1234 user@host"
and finally scp -P 1234 user@host
. It would be so nice to have the same syntax.– Tombart
Feb 4 '15 at 12:58
2
2
@Tombart and then rsync has
rsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.– garetmckinley
Sep 25 '15 at 4:10
@Tombart and then rsync has
rsync -e "ssh -p 1234" user@host
. I swear it's more hassle than it's worth using a custom port.– garetmckinley
Sep 25 '15 at 4:10
1
1
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
@Colt McCormack's answer explains this is improved in new versions, and this peculiar syntax is no longer required.
– meshy
Jan 8 '16 at 11:46
FYI the full command requires the IP typed in twice, and should look something like:
ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
FYI the full command requires the IP typed in twice, and should look something like:
ssh-copy-id "root@192.168.0.100 -p 12345" -i ~/.ssh/id_rsa.pub 192.168.0.100
– degenerate
Dec 2 '17 at 2:40
On macOS (I am on High Sierra) the quotes are not required. ie.
ssh-copy-id -p 8129 user@host
works.– Arjun Mehta
May 21 at 15:57
On macOS (I am on High Sierra) the quotes are not required. ie.
ssh-copy-id -p 8129 user@host
works.– Arjun Mehta
May 21 at 15:57
add a comment |
ssh-copy-id
doesn't take any arguments that it could pass down to the underlying ssh
command, but you can configure an alias in ~/.ssh/config
.
Host myhost
HostName hostname
Port 8129
Then run ssh-copy-id myhost
.
3
This also has the benefit of removing the need for the-p
flag on regularssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.
– Warren Young
Jan 20 '12 at 14:00
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
add a comment |
ssh-copy-id
doesn't take any arguments that it could pass down to the underlying ssh
command, but you can configure an alias in ~/.ssh/config
.
Host myhost
HostName hostname
Port 8129
Then run ssh-copy-id myhost
.
3
This also has the benefit of removing the need for the-p
flag on regularssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.
– Warren Young
Jan 20 '12 at 14:00
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
add a comment |
ssh-copy-id
doesn't take any arguments that it could pass down to the underlying ssh
command, but you can configure an alias in ~/.ssh/config
.
Host myhost
HostName hostname
Port 8129
Then run ssh-copy-id myhost
.
ssh-copy-id
doesn't take any arguments that it could pass down to the underlying ssh
command, but you can configure an alias in ~/.ssh/config
.
Host myhost
HostName hostname
Port 8129
Then run ssh-copy-id myhost
.
answered Jan 19 '12 at 0:11
Gilles
527k12710561581
527k12710561581
3
This also has the benefit of removing the need for the-p
flag on regularssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.
– Warren Young
Jan 20 '12 at 14:00
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
add a comment |
3
This also has the benefit of removing the need for the-p
flag on regularssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.
– Warren Young
Jan 20 '12 at 14:00
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
3
3
This also has the benefit of removing the need for the
-p
flag on regular ssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.– Warren Young
Jan 20 '12 at 14:00
This also has the benefit of removing the need for the
-p
flag on regular ssh
attempts. It is therefore not only the right answer to this question, it is The Right Thing, period.– Warren Young
Jan 20 '12 at 14:00
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
Thanks for this. The 2nd line "HostName hostname" isn't necessary if you are satisfied with the host's natural hostname.
– Lonniebiz
Aug 9 '16 at 15:53
add a comment |
As of openssh-client_6.2 there is now a dedicated port flag for the command allowing for this syntax:
ssh-copy-id -p 8129 user@example
It also added support for adding other ssh options with the -o flag.
Here's is Ubuntu's man page for the appropriate version, introduced in 13.04: http://manpages.ubuntu.com/manpages/saucy/man1/ssh-copy-id.1.html
2
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
add a comment |
As of openssh-client_6.2 there is now a dedicated port flag for the command allowing for this syntax:
ssh-copy-id -p 8129 user@example
It also added support for adding other ssh options with the -o flag.
Here's is Ubuntu's man page for the appropriate version, introduced in 13.04: http://manpages.ubuntu.com/manpages/saucy/man1/ssh-copy-id.1.html
2
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
add a comment |
As of openssh-client_6.2 there is now a dedicated port flag for the command allowing for this syntax:
ssh-copy-id -p 8129 user@example
It also added support for adding other ssh options with the -o flag.
Here's is Ubuntu's man page for the appropriate version, introduced in 13.04: http://manpages.ubuntu.com/manpages/saucy/man1/ssh-copy-id.1.html
As of openssh-client_6.2 there is now a dedicated port flag for the command allowing for this syntax:
ssh-copy-id -p 8129 user@example
It also added support for adding other ssh options with the -o flag.
Here's is Ubuntu's man page for the appropriate version, introduced in 13.04: http://manpages.ubuntu.com/manpages/saucy/man1/ssh-copy-id.1.html
edited Sep 8 '14 at 21:12
answered Sep 8 '14 at 15:48
Colt McCormack
24124
24124
2
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
add a comment |
2
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
2
2
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
This is the only method which worked for the.
– Luca Steeb
Aug 23 '16 at 22:13
add a comment |
A quick look at the source indicates that ssh-copy-id
appears to have no function that permits this. However, you could do something like the following instead:
ssh -p8129 user@host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_*.pub
add a comment |
A quick look at the source indicates that ssh-copy-id
appears to have no function that permits this. However, you could do something like the following instead:
ssh -p8129 user@host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_*.pub
add a comment |
A quick look at the source indicates that ssh-copy-id
appears to have no function that permits this. However, you could do something like the following instead:
ssh -p8129 user@host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_*.pub
A quick look at the source indicates that ssh-copy-id
appears to have no function that permits this. However, you could do something like the following instead:
ssh -p8129 user@host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_*.pub
answered Jan 18 '12 at 23:37
Chris Down
79k14188202
79k14188202
add a comment |
add a comment |
This works (from here):
ssh-copy-id -i ~/.ssh/id_rsa.pub '-p 221 username@host'
add a comment |
This works (from here):
ssh-copy-id -i ~/.ssh/id_rsa.pub '-p 221 username@host'
add a comment |
This works (from here):
ssh-copy-id -i ~/.ssh/id_rsa.pub '-p 221 username@host'
This works (from here):
ssh-copy-id -i ~/.ssh/id_rsa.pub '-p 221 username@host'
edited Dec 14 at 20:23
Jeff Schaller
38.5k1053125
38.5k1053125
answered Sep 2 '12 at 6:25
DJR
6111
6111
add a comment |
add a comment |
I have always used scp
to copy it over:
scp -P 8129 ~/.ssh/id_*.pub user@host:
ssh -p 8129 user@host 'cat id_*.pub >> ~/.ssh/authorized_keys'
Though I must say, I'll probably be using the other (one-line/connection) methods if I remember them in the future. But this is another option for you.
add a comment |
I have always used scp
to copy it over:
scp -P 8129 ~/.ssh/id_*.pub user@host:
ssh -p 8129 user@host 'cat id_*.pub >> ~/.ssh/authorized_keys'
Though I must say, I'll probably be using the other (one-line/connection) methods if I remember them in the future. But this is another option for you.
add a comment |
I have always used scp
to copy it over:
scp -P 8129 ~/.ssh/id_*.pub user@host:
ssh -p 8129 user@host 'cat id_*.pub >> ~/.ssh/authorized_keys'
Though I must say, I'll probably be using the other (one-line/connection) methods if I remember them in the future. But this is another option for you.
I have always used scp
to copy it over:
scp -P 8129 ~/.ssh/id_*.pub user@host:
ssh -p 8129 user@host 'cat id_*.pub >> ~/.ssh/authorized_keys'
Though I must say, I'll probably be using the other (one-line/connection) methods if I remember them in the future. But this is another option for you.
answered Jan 19 '12 at 0:21
Kevin
26.9k106199
26.9k106199
add a comment |
add a comment |
On CentOS7 is just:
ssh-copy-id "-p 1234" user@host
Please take care to don't place user@host within the quotes or you'll get the following error in this distribution:
/usr/bin/ssh-copy-id: ERROR: Bad port ' 1234 user@host'
add a comment |
On CentOS7 is just:
ssh-copy-id "-p 1234" user@host
Please take care to don't place user@host within the quotes or you'll get the following error in this distribution:
/usr/bin/ssh-copy-id: ERROR: Bad port ' 1234 user@host'
add a comment |
On CentOS7 is just:
ssh-copy-id "-p 1234" user@host
Please take care to don't place user@host within the quotes or you'll get the following error in this distribution:
/usr/bin/ssh-copy-id: ERROR: Bad port ' 1234 user@host'
On CentOS7 is just:
ssh-copy-id "-p 1234" user@host
Please take care to don't place user@host within the quotes or you'll get the following error in this distribution:
/usr/bin/ssh-copy-id: ERROR: Bad port ' 1234 user@host'
answered Feb 25 at 12:35
Max Cuttins
213
213
add a comment |
add a comment |
With my macOS, this worked.
ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port> user@host
add a comment |
With my macOS, this worked.
ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port> user@host
add a comment |
With my macOS, this worked.
ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port> user@host
With my macOS, this worked.
ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port> user@host
answered Nov 30 '16 at 7:16
Jin Kwon
226112
226112
add a comment |
add a comment |
I use this command:
ssh-copy-id ssh://user@ip_addr:port
Example:
ssh-copy-id ssh://root@1.2.3.4:23
add a comment |
I use this command:
ssh-copy-id ssh://user@ip_addr:port
Example:
ssh-copy-id ssh://root@1.2.3.4:23
add a comment |
I use this command:
ssh-copy-id ssh://user@ip_addr:port
Example:
ssh-copy-id ssh://root@1.2.3.4:23
I use this command:
ssh-copy-id ssh://user@ip_addr:port
Example:
ssh-copy-id ssh://root@1.2.3.4:23
answered Dec 14 at 20:03
Carlos
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f29401%2fis-it-possible-to-run-ssh-copy-id-on-port-other-than-22%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown