Find the answer to your Linux question:
Results 1 to 4 of 4
Hi friends, I am troubling with creating ssh script for passing password. Please help me. Thanks in advance....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2013
    Posts
    1

    Angry SSH script for passing password


    Hi friends,

    I am troubling with creating ssh script for passing password. Please help me.


    Thanks in advance.

  2. #2
    Just Joined! mrbruno's Avatar
    Join Date
    Jan 2013
    Location
    /MilkyWay/Sol/Earth/USA/NC/Raleigh
    Posts
    63
    Your question is pretty vague. Can you be more specific? What exactly are you trying to do?

    Obviously you generally want to be very careful with passwords. And when I think of ssh and passwords, I often think of sharing my public ssh key with the user on the remote system so I don't have to enter a password. Not only is it extremely convenient but I don't have to worry about my password being in the clear anywhere: I'm not typing it, it's not appearing in my shell history, etc. Do a Google search for "passwordless ssh" if this is what you're looking for.

  3. #3
    Just Joined!
    Join Date
    Apr 2013
    Location
    Gurgaon, India
    Posts
    6
    Quote Originally Posted by karthikbabueee View Post
    Hi friends,

    I am troubling with creating ssh script for passing password. Please help me.


    Thanks in advance.

    Hi,

    The

    Use following command

    sshpass -p'yourpasswd' ssh username@host-name

    It wan't ask your passwd then.

    Regards

  4. #4
    Just Joined!
    Join Date
    Mar 2009
    Location
    Norway
    Posts
    67
    I have to chime in with mrbruno here, use ssh-keys, ssh-agent and forward if you need to bounce off another server first, but try not to add your password in scripts...

    -at-least- prefix the command with a space to avoid adding it to .bash_history !

Posting Permissions

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