Reputation: 23676
I want to create a script that runs shell commands on a remote Linux machine and print out the result. Some thing like a "run once" SSH. Or for those familiar with Android development, something like "adb shell". For example, I want to run "ls" on my remote machine and display the results on the local host.
Upvotes: 0
Views: 166
Reputation: 15776
This is supported directly by ssh:
ssh [options] [user@]hostname [command]
eg
ssh user@host ls
If not command is given an interactive shell is usually run by default.
Upvotes: 2