automatically log into secure shell - SSH

This is a discussion on automatically log into secure shell - SSH ; How do I create a script to automatically log into secure shell? I tried this on Unix and it didn't work: echo mypassword | ssh me@myhost.com Thanks....

+ Reply to Thread
Results 1 to 4 of 4

Thread: automatically log into secure shell

  1. automatically log into secure shell

    How do I create a script to automatically log into secure shell?

    I tried this on Unix and it didn't work:

    echo mypassword | ssh me@myhost.com

    Thanks.


  2. Re: automatically log into secure shell

    mike7411@gmail.com writes:

    >How do I create a script to automatically log into secure shell?


    >I tried this on Unix and it didn't work:


    >echo mypassword | ssh me@myhost.com


    And why in the world would you want to do that. That script is now a way of
    reading your password.
    Use rsa or dsa passwordless logons with ssh.





  3. Re: automatically log into secure shell

    Unruh wrote:
    > mike7411@gmail.com writes:
    >
    >> How do I create a script to automatically log into secure shell?

    >
    >> I tried this on Unix and it didn't work:

    >
    >> echo mypassword | ssh me@myhost.com

    >
    > And why in the world would you want to do that. That script is now a
    > way of reading your password.
    > Use rsa or dsa passwordless logons with ssh.


    Unruh, didn't I just spank you for mis-handling newbies over on
    comp.os.linux.setup?

    Mike, ignore the snarking. But putting a user password in a shell script is
    a *BAD* idea. It can be done with tools like "expect", but Unruh's complaint
    is correct: it's just the tone and advice that are missing usefulness.

    If the user needs to run this script, they should be able to use an SSH
    keyring, such as "ssh-agent", to use a properly passphrased SSH key and
    unlock it locally, or even keep it unlocked for overnight jobs. This stuff
    is documented in exquisite detail in Richard Silverman's book on SSH, which
    I highly recommend as a good reference manual for new admins or users like
    yourself.

    What are you trying to do, anyway?



  4. Re: automatically log into secure shell


+ Reply to Thread