let Putty run command in remote server

In some case, putty command line can help us run remote command in this way:

Example
c:> putty.exe -ssh -2 -l username -pw password -m c:remote.cmd remote_host

c:> type c:remote.cmd

echo `date`;exit 0;

Note:
For full Putty command line options, check out "Putty User Manual" .

About these ads

About Pang

Oracle DBA who is contributing in database, fusion middleware and identity management
This entry was posted in Perl. Bookmark the permalink.

2 Responses to let Putty run command in remote server

  1. Alfred says:

    Hi,

    May i know where should the command file remote.cmd be? is it reading from the remote terminal or the actual server that we putty into? i got error saying “cannot find command file”.

  2. Tejas Thakur says:

    i want to execute a command say sar and generate the spool on txt file on local machine…please gudide.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s