Friday, January 18, 2013

Use SSH to run a non-X program or command remotely

If you're trying to run an X program remotely, you'll find lots of help on-line. But what if you want to remotely execute a script, program, or command-line command in regular old text mode? Where's the HOWTO for that?

There is none, because it's so obvious.

The 'ssh' command takes two arguments: a hostname (or IP address) and, optionally, a command. The command is run remotely on the host specified by hostname. For example, the following command executes the 'ls' command as 'root' on the host 'mysrv':
$ ssh root@mysrv ls
Password:
bin
inst-sys









No comments:

Post a Comment