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

Posted on in Categories , , , , , , , , , last updated March 8, 2016

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 [email protected] "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?

Apple OS X: Install X Window System XQuartz For SSH X11 Forwarding On a Mavericks or Yosemite

Posted on in Categories , , , , last updated May 5, 2015

I need to tunnel X Window securely over SSH bases session so that I run X program on my remote Linux/Unix server/workstation and get back display to my Apple Macbook pro laptop. I tried the ssh -X [email protected] and ssh -Y [email protected] commands on both OS X Mountain Lion and Apple OS X Mavericks/Yosemite. But, I am unable to use the ssh command with X11.

How do I fix this problem on OS X and enable X11 forwarding with ssh command? How do I install XQuartz (X11.app) server on Apple OS X Mountain Lion or Mavericks or Yosemite?