Sunday, November 23, 2008

Invoking Remote Programs

You want to invoke a program on a remote machine over a secure network connection

For non interactive commands

ssh -l remoteuser remotehost uptime

for interactive programs, add the -t option

ssh -t -l remoteuser remotehost vi

For X window applications, add the -X option to enable X forwarding.also add the -f option to background the program after authentication , and to redirect standard input fro /dev/null to avoid dangling connections.

ssh -X -f -l remoteuser remotehost xterm

or you can add the -C option to enable compression:-

ssh -C -X user@hostname gui_cmd

verified on ubuntu 8.04.1

No comments:

Post a Comment