On Sun, Jun 15, 2008 at 11:07 AM, Lars Noodin <[EMAIL PROTECTED]>
wrote:
> Perhaps my expectations or syntax is incorrect, but I see what looks
> like difficulty reading stdin using ssh-keyscan:
>
>        $ ssh-keyscan -t rsa login.itd.umich.edu | ssh-keygen -l -f -
>        -: No such file or directory

ssh-keygen's -l option is not designed for operation with pipes.  In
particular, depending on the key type in the file, it generally needs
to open and read the file multiple times.  That is, it first passes
the filename to the "read file as RSA1 private key" routine; if that
fails then it passes the filename to the "read file as RSA1 public
key" routine, etc.


> Doing it in two steps works:
>
> $ ssh-keyscan -t rsa login.itd.umich.edu >/tmp/x;ssh-keygen -l -f /tmp/x
> # login.itd.umich.edu SSH-1.99-OpenSSH_4.6p1-hpn12v17
> 1024 10:4a:ec:d2:f1:38:f7:ea:0a:a0:0f:17:57:ea:a6:16 login.itd.umich.edu

Yep, that's the way to accomplish your end goal.


Philip Guenther

Reply via email to