[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#322228: ssh: ssh-copy-id fails uncleanly



Package: ssh
Severity: normal
Version: 3.8.1p1-8.sarge.4

I ran `ssh-copy-id 192.168.0.2`, which added to the relevent
~/.ssh/authorized_keys the following line:

  The agent has no identities.

That is the output of "ssh-add -L".  So, if ssh-add -L returns that
string, then ssh-copy-id should fail cleanly by printing an error
message to stderr, and returning nonzero.

Best is if it can detect a valid key, and only succeed on that
condition.

I have:

  $ echo $SSH_AUTH_SOCK
  /tmp/ssh-NNewxp3460/agent.3460

and

  pryzbyj@andromeda:~$ ls -l $(echo $SSH_AUTH_SOCK)
  srwxr-xr-x  1 pryzbyj pryzbyj 0 Aug  9 15:51 /tmp/ssh-NNewxp3460/agent.3460

and

  pryzbyj@andromeda:~$ ps -ef |grep 3460
  pryzbyj   3460  3440  0 15:51 pts/0    00:00:00 blackbox
  pryzbyj   3496  3460  0 15:51 ?        00:00:00 /usr/bin/ssh-agent sh /home/pryzbyj/.xsession
  pryzbyj   3498  3460  0 15:51 pts/0    00:00:01 xosview
  pryzbyj   3550  3460  0 15:53 ?        00:00:01 xterm
  pryzbyj   4033  3460  0 16:46 ?        00:00:00 xterm

I'm not sure why ssh-add can't find the information:

  $ ls ~/.ssh
  authorized_keys         id_dsa-cf-shell.sf.net.pub  id_rsa.pub
  id_dsa                  id_dsa.pub                  known_hosts
  id_dsa-cf-shell.sf.net  id_rsa                      known_hosts.0

Justin




Reply to: