How to run multiple scripts one after the other on a remote server after doing sshpass from by local server to the remote server?

I ssh to the remote server directory using

sshpass ssh -t remote_server_name "cd /desired_directory/; exec $SHELL -l"

Now I want to run a few scripts inside that directory. I am trying using ./name.sh after the above line but it's not working. Please help.

5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like