When I try to use an ssh command in a shell script, the command just sits there. Do you have an example of how to use ssh in a shell script?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on what you want to do, and how you use it. If you just want to execute a command remotely and safely on another machine, just use
for example
In order to do this safely you need to either ask the user for the password during runtime, or set up keys on the remote host.