Find the answer to your Linux question:
Results 1 to 5 of 5
Here is my small script: Code: #!/bin/sh ssh 10.0.0.5 thepassword Now when i launch the script, it doesn't log into the remote system but prompts me for the password although ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    16

    how can I log in to a remote system using a shell script!!!

    Here is my small script:

    Code:

    #!/bin/sh
    ssh 10.0.0.5
    thepassword

    Now when i launch the script, it doesn't log into the remote system but prompts me for the password although I wrote the password in the script..

    How can I make the Shell read the password from my script???

  2. #2
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    You can't, ssh won't allow it. The common method is to use public/private keys.

  3. #3
    Just Joined!
    Join Date
    Jun 2009
    Posts
    16
    How about telnet. Can I log to the remote system using telnet?

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695

  5. #5
    Just Joined!
    Join Date
    Jun 2009
    Posts
    16
    Thanks, HROAdmin26............Your link is pefect....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...