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

Recommended Answers

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?

Jump to Post

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.