yesterday, i was demoing how to use ssh-copy-id on centos 5.5 to copy one's public key to another machine and account so you don't need to type the password anymore. i used "ssh-keygen" to create the standard RSA-format files, then checked the man page for ssh-copy-id, which reads:
ssh-copy-id [-i [identity_file]] [user@]machine ... If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used
the above seems to suggest that, as long as i'm happy copying over the default id_rsa.pub file, all i need type is:
$ ssh-copy-id -i barney@192.168.2.19 /usr/bin/ssh-copy-id: ERROR: No identities found $
clearly, that doesn't work. but if i simply add in the name of the file, it's fine:
$ ssh-copy-id -i .ssh/id_rsa.pub barney@192.168.2.19 ^^^^^^^^^^^^^^^ any reason for that? the man page clearly states that that file is the default, but it's obvious i still need to type its name. am i missing something? is the man page wrong?
rday
From: Robert P. J. Day rpjday@crashcourse.ca
If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used
My man page says: "~/.ssh/identity.pub"...
JD
On Thu, 7 Oct 2010, John Doe wrote:
From: Robert P. J. Day rpjday@crashcourse.ca
If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used
My man page says: "~/.ssh/identity.pub"...
argh ... sorry, i was logged into the wrong system when reading the man page, i was connected to my ubuntu system. interesting that different distros have different default files for the same command. i will definitely remember that.
rday
On 7/10/10 10:23 PM, Robert P. J. Day wrote:
My man page says: "~/.ssh/identity.pub"...
argh ... sorry, i was logged into the wrong system when reading the man page, i was connected to my ubuntu system. interesting that different distros have different default files for the same command. i will definitely remember that.
Slackware also says ~/.ssh/id_rsa.pub, so chances are this is (another) Red Hat/CentOS specific modification. Anyone got an OpenBSD box to double-check on?
Regards, Ben
OpenBSD is not shipped with ssh-copy-id. But ssh-copy-id is only script. So if you try this:
[root@wenca ~]# cd /usr/bin/ [root@wenca bin]# head -n 20 ssh-copy-id #!/bin/sh
# Shell script to install your identity.pub on a remote machine # Takes the remote machine name as an argument. # Obviously, the remote machine must accept password authentication, # or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/identity.pub"
you can get it.
Regards,
Vaclav Strachon
On 7.10.2010 13:54, Ben McGinnes wrote:
On 7/10/10 10:23 PM, Robert P. J. Day wrote:
My man page says: "~/.ssh/identity.pub"...
argh ... sorry, i was logged into the wrong system when reading the man page, i was connected to my ubuntu system. interesting that different distros have different default files for the same command. i will definitely remember that.
Slackware also says ~/.ssh/id_rsa.pub, so chances are this is (another) Red Hat/CentOS specific modification. Anyone got an OpenBSD box to double-check on?
Regards, Ben
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
At Thu, 7 Oct 2010 07:23:55 -0400 (EDT) CentOS mailing list centos@centos.org wrote:
On Thu, 7 Oct 2010, John Doe wrote:
From: Robert P. J. Day rpjday@crashcourse.ca
If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used
My man page says: "~/.ssh/identity.pub"...
argh ... sorry, i was logged into the wrong system when reading the man page, i was connected to my ubuntu system. interesting that different distros have different default files for the same command. i will definitely remember that.
My my (CentOS 5.5) man ssy-keygen:
~/.ssh/identity.pub Contains the protocol version 1 RSA public key for authentica- tion. The contents of this file should be added to ~/.ssh/authorized_keys on all machines where the user wishes to log in using RSA authentication. There is no need to keep the contents of this file secret.
identity.pub is *OpenSSH V1* public key file. How old is the ubuntu system? Is OpenSSH V1 or V2 installed? The V1 RSA protocol is old available for older systems...
rday
On Thu, 7 Oct 2010, Robert Heller wrote:
At Thu, 7 Oct 2010 07:23:55 -0400 (EDT) CentOS mailing list centos@centos.org wrote:
On Thu, 7 Oct 2010, John Doe wrote:
From: Robert P. J. Day rpjday@crashcourse.ca
If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used
My man page says: "~/.ssh/identity.pub"...
argh ... sorry, i was logged into the wrong system when reading the man page, i was connected to my ubuntu system. interesting that different distros have different default files for the same command. i will definitely remember that.
My my (CentOS 5.5) man ssy-keygen:
~/.ssh/identity.pub Contains the protocol version 1 RSA public key for authentica- tion. The contents of this file should be added to ~/.ssh/authorized_keys on all machines where the user wishes to log in using RSA authentication. There is no need to keep the contents of this file secret.
identity.pub is *OpenSSH V1* public key file. How old is the ubuntu system? Is OpenSSH V1 or V2 installed? The V1 RSA protocol is old available for older systems...
ubuntu 10.10 (yes, really, development version constantly updated to track upcoming 10.10). in short, really new. so the current centos 5.5 ssh-copy-id command clearly(?) still has openssh V1 default set. not a big deal, just surprised me.
rday