LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-25-2016, 03:37 PM   #1
james K mobley
LQ Newbie
 
Registered: Feb 2016
Distribution: debian 7
Posts: 3

Rep: Reputation: Disabled
ssh-copy-id not working as it should


Hi

I read the man page for ssh-copy-id and the -p port switch seems to not work.

Code:
ssh-copy-id -p 22025 -i .ssh/id_rsa.pub blah@192.168.0.55
I get this message from the shell:
usage: ssh-copy-id [-i identity_file] [user@]hostname

I tried again without the -p switch
Code:
ssh-copy-id -i .ssh/id_rsa.pub blah@192.168.0.55
and I get this error

Quote:
15
ssh: connect to host 192.168.0.55 port 22: Connection refused
Now try logging into the machine, with "ssh 'blah@192.168.0.55'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.
Anyway, it didn't work either.

Good news is I solved it by using scp to copy it over to the server and then doing a cat id.rsa.pub >> .ssh/authorized_keys

Has anyone had issues using ssh-copy-id in the past?

Last edited by james K mobley; 02-25-2016 at 03:40 PM.
 
Old 02-25-2016, 06:09 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Specifying a port other than 22 is not a published option in earlier versions of the utility. One way to do it is:

ssh-copy-id -i "user@server -p xxxx"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] copy files over ssh Shao Lung Slackware 5 05-08-2011 02:58 PM
SSH not working after ssh-keygen due to lack of entropy grob115 Linux - Security 8 08-28-2010 12:33 PM
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 03:23 AM
ssh copy lyke Slackware 6 10-25-2007 05:26 AM
making a working copy of file system over ssh undeadmachine Linux - Newbie 4 10-25-2007 12:47 AM


All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration