Hi!

I'd love to use SSH keys, but I can't. Why? because I manage about 3000 servers (now you can see why this Perl script would be handy!) and about 30% of those use a shared home directory and my key is in $HOME/.ssh/authorized_keys.
For some reason, the very first time I connect to the server, it asks me for a password. From then on, it works with the key.

That's not the only problem, there are other servers where my home directory is a symlink to somewhere on the filesystem and SSH refuses to read my key in that sort of scenario, so SSH keys don't work on these systems (and it's a lot of them!!). Only conclusion I came to is that SSH does not read your key if your home dir is a symlink, as I tried changing permissions all over the place and no luck.

I figured since some work, some don't, I'll just try and work with password prompts and be done with it.

It's probably worth saying that I don't have root on the 3000 servers, otherwise I could probably fix a lot of these issues I'm having with SSH keys.

In reply to Re^2: IO::Pty, Net::Telnet and SSH by Anonymous Monk
in thread IO::Pty, Net::Telnet and SSH [SOLVED] by gonza

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.