Executing a command on a remote server

This is probably a very old hat for Linux-savy people. You can use ssh to execute commands on a remote server, just pass them on as an additional argument:

ssh me@my.server.de "cd bla ; ls ; python test.py "

I use double quotes (“) istead of single quotes (‘) to interpret variables. Different commands are separated with semicolon (;). You can use any command you like, but for some reason when I call some GUI I don’t get the output on the command line until the window is closed.

This entry was posted in Linux and tagged , by swk. Bookmark the permalink.

About swk

I am a computational linguist, teacher of computer science and above all a huge fan of LaTeX. I use LaTeX for everything, including things you never wanted to do with LaTeX. My latest love is lilypond, aka LaTeX for music. I'll post at irregular intervals about cool stuff, stupid hacks and annoying settings I want to remember for the future.