I have a script in my system. I want to run this script on the remote system which has SSH connection.

Recommended Answers

All 2 Replies

You can use scp to copy the script from your local sysem to the remote system.

scp file.txt username@10.10.1.1:/path/to/put/file

Would that help you?

It is very easy just put the script file path after the ssh command like below.
ssh ismail@192.168.142.144 'bash -s' < cat myscript.sh

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.