Execute a program runs background via SSH

By Haktan Suren, PhD
In Blog
Oct 3rd, 2012
0 Comments
3824 Views

This is extremely helpful to automate running some program through bash

Usage:

ssh -f username@ipadress "cd some/directory;" program.extension

Example:

ssh -f hsuren@123.123.12.12 "cd home/executables/bin;" haktan.pl

Output:

This will first ssh to given address, cd to the directory and run haktan.pl file and produce PID and exit.

Enjoy!

About the Author

Haktan Suren, PhD
- Webguru, Programmer, Web developer, and Father :)

Wrap your code in <code class="{language}"></code> tags to embed!

Leave a Reply

E-mail address is required for commenting. However, it won't be visible to other users.

Loading Facebook Comments ...
Loading Disqus Comments ...