Remote command

Jim Knoble jmknoble at pobox.com
Wed Dec 7 08:50:05 EST 2005


Circa 2005-12-05 12:36 dixit Pedro Drimel Neto:

: to consult how much space has on disk of server, the application send a 
: command to the server using the SSH Server to send the command but the 
: output of the command must be displayed on workstation screen... Do you 
: think this is possible ?

Yes:

    ssh server-name-or-ip-address 'df -k'

The result is displayed on the standard output.  Keep in mind that, if
you want to automate this without the user being prompted for a password
or passphrase every time, you must do this in conjunction with
public-key authentication and the ssh-agent.

Good luck.

-- 
jim knoble  |  jmknoble at pobox.com  |  http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 809F:09B9:9686:D035:4AB0::9455:124B:0A62:DD6A:76D6)
 .....................................................................
 :"The methods now being used to merchandise the political candidate :
 : as though he were a deodorant positively guarantee the electorate :
 : against ever hearing the truth about anything."   --Aldous Huxley :
 :...................................................................:




More information about the openssh-unix-dev mailing list