Skip to content Skip to sidebar Skip to footer

Is This Possible In One Ssh Session? (bash & Python)

I'm writing a python script (on a Linux box) that will perform an SSH and run a string of commands on the remote machine (Sun-OS). I'm having trouble getting the remote commands to

Solution 1:

Try something like this:

ssh user@remote << EOT
echo "test"
echo "you can put here anything like in a bash script"
echo "and it should work"
EOT

Post a Comment for "Is This Possible In One Ssh Session? (bash & Python)"