even without taking the risk of leaving your private key unprotected by a passphrase, it is possible to get unattended logins using SSH with the public key method by using the ssh_agent program.

ssh_agent allows you to leave your private key encrypted on disk by prompting you for your passphrase when run and keeping it in mlock'd memory (i think) to provide to SSH whenever it is necessary to decrypt your private key from disk. this is not considerably more secure than the empty passphrase method while the ssh-agent has your passphrase in memory, but it is equally secure to a plain passphrase/private key login when the agent does not have the passphrase in memory.

with this in consideration, many people run ssh_agent from their .login or .Xclients file to start it up as soon as they log in. it takes their passphrase immediately and acts from then on as if the private key is not protected (i.e. they are not prompted every time they need to use the key, ssh_agent supplies it instead).


In reply to RE: Setting up SSH to execute commands remotely (without passwords) by mdillon
in thread Moving around with password protected machines. by Pearte

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.