How to pass a command script to remote computer over Putty SSH and execute it ? - SSH

This is a discussion on How to pass a command script to remote computer over Putty SSH and execute it ? - SSH ; I can establish successfully a SSH connection over Putty and enter commands directly in the terminal window. Fine. However I want to automate the execution of my command sequence. What I am searching for is a way to enter all ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to pass a command script to remote computer over Putty SSH and execute it ?

  1. How to pass a command script to remote computer over Putty SSH and execute it ?

    I can establish successfully a SSH connection over Putty and enter commands directly
    in the terminal window. Fine.

    However I want to automate the execution of my command sequence.

    What I am searching for is a way to enter all commands into a script text file and
    the pass this script file for remote execution to Putty.

    How can I do this ? I would appreciate a solution similar to:

    D:\ssh\putty.exe -load "myProfile" -script "D:\test\myremotecommands.txt"

    but it does not work.

    Marcus


  2. Re: How to pass a command script to remote computer over Putty SSHand execute it ?

    On Nov 21, 7:58 am, m...@buzz.com (Marcus Mender) wrote:
    > I can establish successfully a SSH connection over Putty and enter commands directly
    > in the terminal window. Fine.
    >
    > However I want to automate the execution of my command sequence.
    >
    > What I am searching for is a way to enter all commands into a script text file and
    > the pass this script file for remote execution to Putty.
    >
    > How can I do this ? I would appreciate a solution similar to:
    >
    > D:\ssh\putty.exe -load "myProfile" -script "D:\test\myremotecommands.txt"
    >
    > but it does not work.
    >
    > Marcus


    Marcus,

    You need to get plink from the putty's download page.
    Then, you can use it like this

    plink.exe -ssh -pw pass -noagent -m commands.txt user@10.0.0.2

    Matias

  3. Re: How to pass a command script to remote computer over Putty SSH and execute it ?

    Hi,

    You can used an free addon of Putty ExtraPuTTY which offers automatic sequencing of commands.
    With this addon you can send automaticly a command with a simple click of mouse or sequence of commands.

    Win32\TestStand Telnet,SSH API and Automatic sequencing of commands (site in english)

    I hope that can help you.

    Asebt

+ Reply to Thread