• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2139
  • Last Modified:

Putty Plink command line issue unsupported

Hello,

The goal is to run some tasks on the MSA2000 from a batch file located a Windows remote host
To automatically logon into the MSA2000 I use this command:
 putty.exe -ssh <host ip address> -l <username> -pw <password>
                        or
plink.exe -ssh <host ip address> -l <username> -pw <password>
This works fine!!
But I'm not able to execute command :
I test first the command through a manual logon session and it works fine but when I want to get this automatically with the following command :
 putty.exe -ssh <host ip address> -l <username> -pw <password> "command"
                        or
 putty.exe -ssh <host ip address> -l <username> -pw <password> -m "file.txt"
where I put the command into the text file
I get an error message which tell me that this is an "unsupported command"

Thanks
S.
0
slimard
Asked:
slimard
  • 4
  • 2
1 Solution
 
slimardAuthor Commented:
Can someone please help with this? I am bit stuck
0
 
ahoffmannCommented:
start putty and save a session for your remote login, let's assume you name the session FOO
then you can use plink to execute a command as follows

plink FOO pwd
0
 
ahoffmannCommented:
it works also simply like

plink user@remote pwd
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
slimardAuthor Commented:
To login it is ok but not to run the commands...So I am using now TeraTerm with its macro features and it is working like a charm
0
 
ahoffmannCommented:
LOL, beside the missing ssh2 support TT is the better choice for me too ;-)
0
 
ahoffmannCommented:
update: teraterm now supports ssh2 and utf-8
http://sourceforge.jp/projects/ttssh2/
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now