Problem using SSH from a script.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KV1
    New Member
    • Aug 2007
    • 1

    Problem using SSH from a script.

    Hi,

    I am new to SSH. I tried to connect to a server and run a command on it using SSH from a script. It asked for a password and then, it succesfully connected to the intended server. But in this process, it is asking for a password to be entered at the terminal. I wish to use this as part of a background script and hence would like to supply the password in some form in the script itself and not at the terminal. Is this possible ?

    The command that I am currently using:

    ssh username@server name command

    Is there some form of SSH which uses password within (may be like ssh username/password@server etc) or SSH without password option ??? Please guide.


    Thanks in advance.
    KV
    .
  • prn
    Recognized Expert Contributor
    • Apr 2007
    • 254

    #2
    You can also supply an RSA public key. Here is one site explaining how to do that.

    HTH,
    Paul

    Comment

    Working...