Kingz Posted June 4, 2020 Posted June 4, 2020 Hi Team, Could you please help me with script to execute Putty using autoit script. Thanks
Marc Posted June 4, 2020 Posted June 4, 2020 RunWait(@ComSpec & ' /c "c:\Program Files\putty\plink.exe" -ssh root@SERVERNAME -pw PASSWORD halt', @SystemDir) this would connect with putty to the server SERVERNAME as root, usind the password PASSWORD and send a "halt" command to the machine. Or you could simulate using the real putty.exe and simulate keystrokes: Func putty($server, $passwort, $command) Run("c:\Program Files\putty\putty.exe" & " " & $server) WinWaitActive($server) Sleep(200) Send("root") Send("{ENTER}") Sleep(300) Send($passwort) Send("{ENTER}") Sleep(800) Send($command) Sleep(200) Send("{ENTER}") EndFunc ;==>putty Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
Kingz Posted June 4, 2020 Author Posted June 4, 2020 Hi Marc, can you send a script to just run the putty exe file? Thanks
TheXman Posted June 4, 2020 Posted June 4, 2020 It appears you haven't learned anything since the last time you created similar topics. How is this current topic any different than the one below? You still can't figure out how to run Putty from a script? Really?!? You have shown absolutely NO effort of your own in this or the last 2 topics that you created on this subject. In all cases, people have pointed you in the right direction. Your response has basically been thanks that's great but can you pick me up and carry me there. Why should anyone waste their time trying to help you if you repeatedly show no effort of your own? Where are any of your attempts? What have you actually tried that didn't work? CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now