1

I am able to connect to a remote linux server by using

    start C:\Users\pankmish\Downloads\putty.exe -ssh stag -l username -pw password

But Now i am trying to give linux CLIs from same batch script, Can anybody please suggest me; How to pass CLIs in remote linux sever from the batch script?

It will be very helpful if i'll any demo script for the same.

1 Answer 1

1

You can try the -m option if I am reading the documentation correctly. It specifies a file with a command to run. Multiple commands on new lines are possible, but apparently not guaranteed. Alternately, you could install a different SSH client (like OpenSSH for Windows) which provides the standard openssh ssh client. You then just run ssh user@host command. You would need to set up proper key authentication to avoid entering a password though.

1
  • I tried using -m with the command to run but the problem is it opens a putty window and suddenly closes it, i am not able to see what's happening in the screen.
    – pankmish
    Commented Apr 4, 2014 at 5:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .