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

Bug#431538: ssh asks for passphrase for unreadable private key file



Package: openssh-client
Version: 1:4.3p2-9

ian@lalonde:~/adt-play$ ls -al /root/.ssh/id_dsa_adt
-rw------- 1 root root 672 Jul  2 18:15 /root/.ssh/id_dsa_adt
ian@lalonde:~/adt-play$ id
uid=1000(ian) gid=1000(ian) groups=1000(ian),1001(AdtXenUs)
ian@lalonde:~/adt-play$ strace -s500 -ot ssh -i /root/.ssh/id_dsa_adt root@172.18.45.68
ian@lalonde:~/adt-play$ ssh -i /root/.ssh/id_dsa_adt root@172.18.45.68 
Enter passphrase for key '/root/.ssh/id_dsa_adt': 
^C
Enter passphrase for key '/root/.ssh/id_dsa_adt': 
ian@lalonde:~/adt-play$ strace -s500 -ot ssh -i /root/.ssh/id_dsa_adt root@172.18.45.68
Enter passphrase for key '/root/.ssh/id_dsa_adt': 
^C

This is, of course, daft.  Looking at the strace (see extract below)
shows that indeed it gets EACCESS and then decides to ask for the
passphrase as if that's going to help.

Ian.

...
stat64("/root/.ssh/id_dsa_adt", {st_mode=S_IFREG|0600, st_size=672, ...}) = 0
open("/root/.ssh/id_dsa_adt", O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied)
open("/dev/tty", O_RDWR|O_LARGEFILE)    = 4
close(4)                                = 0
open("/dev/tty", O_RDWR|O_LARGEFILE)    = 4
rt_sigaction(SIGALRM, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {0x8078320, [], 0}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGQUIT, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTSTP, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTTIN, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTTOU, {0x8078320, [], 0}, {SIG_DFL}, 8) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(4, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon -echo ...}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon -echo ...}) = 0
write(4, "Enter passphrase for key \'/root/.ssh/id_dsa_adt\': ", 50) = 50
read(4, 0xbfbcfcab, 1)                  = ? ERESTARTSYS (To be restarted)
--- SIGINT (Interrupt) @ 0 (0) ---
...



Reply to: