Putty run commands from file


















Per the putty manual , there is only -m which can be used to give it a file containing one or more commands to be executed in sequence. If you have pterm which usually ships with putty AND you have a local ssh command line program, you can do the following. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Run remote command with putty Ask Question.

Asked 5 years, 1 month ago. Active 10 months ago. Viewed 50k times. When I do putty -ssh user host -pw password echo "hi" I get a network error But if I do putty -ssh user host -pw password An SSH session is successfully opened in a putty terminal. Improve this question. You are trying to do things which are easier to accomplish on non-Windows operating systems.

Consider whether you can use something other than Windows as your workstation OS. One thing i have seen with plink that you may not have access to users env variables when run scripts using plink which needs env variables. So that may be exposed in plink session and script will fail.

Please advise if there a way around this. I have faced this issue. Hi, I have downloaded the putty and plink. Is it possible to by pass admin pw, and security popup, like sh1 warning etc i will be expecting your reply. Save my name, email, and website in this browser for the next time I comment.

Notify me of followup comments via e-mail. All rights reserved Terms of Service. Plink is a companion command-line utility for PuTTY.

Ahmad Alfakharany May 16, , am. Bhagyaraj May 16, , pm. Nicely written on putty plink, thank you. Kyrax May 17, , am. Gopal June 1, , am. I will be posting instruction guides, how-to, troubleshooting tips and tricks on Linux, database, hardware, security and web.

Collectives on Stack Overflow. Learn more. Asked 5 years, 4 months ago. Active 2 months ago. Viewed 47k times. These are the things I need to do: Open putty. Run a shell script. Thanks in advance. Improve this question. Martin Prikryl k 47 47 gold badges silver badges bronze badges. ManishPrajapati ManishPrajapati 1 1 gold badge 5 5 silver badges 16 16 bronze badges. Add a comment. Active Oldest Votes. PuTTY has the -m switch , that you can use to provide a path to a file with a list of commands to execute: putty.

And in addition to those, you can specify your command directly on its command like: plink. Now, to make use of PuTTY commands , a terminal emulator that connects the client to the server is required. PuTTY is one such emulator which is open-source and free to download. You just need to use the following command to connect to the server:.



0コメント

  • 1000 / 1000