G Gabriel9999 Member Joined Mar 12, 2019 Messages 38 Reaction score 4 Credits 130 May 7, 2020 #1 I have a script in my system. I want to run this script on the remote system which has SSH connection.
I have a script in my system. I want to run this script on the remote system which has SSH connection.
TechnoJunky Well-Known Member Joined Dec 3, 2018 Messages 505 Reaction score 406 Credits 432 May 7, 2020 #2 While I'm sure there's a way to send all the commands to the remote system, I'd say the easiest way to do this is just to copy (FTP) the file to the remote system, then SSH to it and run it there. Is this not an option?
While I'm sure there's a way to send all the commands to the remote system, I'd say the easiest way to do this is just to copy (FTP) the file to the remote system, then SSH to it and run it there. Is this not an option?
dos2unix Well-Known Member Joined May 3, 2019 Messages 3,237 Reaction score 2,988 Credits 28,493 May 7, 2020 #3 Use can use rsh, and rexec (usually they are disabled, but you can enable them).. But this sounds like a perfect job for ansible.
Use can use rsh, and rexec (usually they are disabled, but you can enable them).. But this sounds like a perfect job for ansible.
samuel tarcin New Member Joined Mar 6, 2019 Messages 24 Reaction score 11 Credits 48 May 8, 2020 #4 It is very easy just put the script file path after the ssh command like below. ssh [email protected] 'bash -s' < cat myscript.sh Look: https://www.poftut.com/run-shell-script-command-remote-ssh/
It is very easy just put the script file path after the ssh command like below. ssh [email protected] 'bash -s' < cat myscript.sh Look: https://www.poftut.com/run-shell-script-command-remote-ssh/