remote command with putty
- From: Alex <alex.wiesmaier@xxxxxxxxx>
- Date: Tue, 25 Sep 2007 17:18:30 -0000
Hi,
I try to find a way to execute a remote command with putty on the
command line. Unfortunately I can NOT use plink, it has to be putty.
In addition I can NOT use stored sessions, I have to give all
parameters via the command line.
First I tried to give the remote command directly in the command line
as if putty was plink:
putty.exe user@xxxxxxxxxxx "ls -la"
Did not work. Error message = Invalid Port Number. As I did not find
any related hint in the putty docs, I suppose putty does not accept
remote commands in the command line. But I found the option -m which
allows to specify a file containing one (or more) remote commands:
putty.exe -m remoteCommand.sh user@xxxxxxxxxxx
where remoteComand.sh conntains only one command: ls -la
Does not work. After prompting me for the user-password the putty
shell closes immediately, without running the remote command. I found
the same error report a few times in the web, but the solution always
was using plink ...
Any ideas?
.
- Follow-Ups:
- Re: remote command with putty
- From: Unruh
- Re: remote command with putty
- Prev by Date: Re: Putty connection refused, even if WinSCP3 works ?
- Next by Date: Re: remote command with putty
- Previous by thread: Putty connection refused, even if WinSCP3 works ?
- Next by thread: Re: remote command with putty
- Index(es):
Relevant Pages
|
|