Quantcast
Channel: nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED)
Viewing all articles
Browse latest Browse all 2612

How To SSH Run Multiple Command On Remote Machine And Exit SafelynixCraft

$
0
0
I have a backup sync program on local server. I have an ssh password less login set up, and I can run commands on an external server in bash script doing:
ssh root@server2 "sync; sync; /sbin/shutdown -h now"
How do I run multiple commands in bash on a remote Unix or Linux server? What is the best Way to SSH in and Run various unix commands in bash?

Viewing all articles
Browse latest Browse all 2612

Trending Articles