|
KiTTY : ForumLast modification : - |
|
|
|---|---|---|
| Welcome / Recent changes / News / Forum / Download / Contacts | Edit | |
Fully automatic session
Aramil - Mon 01/12/2014 12:16:15 CET +0100
Hi
I'm trying to switch device setting with script. I can log in to this device with telnet or SSH. Is there a way to get past second password question? Actually i can't break through this - device needs a confirmation of password in one point. I'm trying to create something like this: //login to device (telnet or ssh) //login question login //password question password command1 //password question password command2 command3 //close session I was also thinking about doing this as C# command line program, but my skill are only good enough to understand existing code not to write my own. I'll be glad for any tips. Aramil - Mon 01/12/2014 12:51:59 CET +0100
Ok, sorry to bother you. I was just making excessive space between commands. Bad habit from programming learning...
It works correct with shortcut like that: "C:\kitty_portable.exe -ssh admin@1.1.1.1 -pw pass -cmd cmd1\npass\cmd2\nx\nx" moatamedi - Sat 13/12/2014 15:41:13 CET +0100
Hi
First thanks a lot of professional KiTTY! when i use this in c# to login in a Cisco swtich: kitty.exe -ssh admin@1.1.1.1 -pw pass -cmd enable\nEnablePass\n kitty return error: Unable to open connection to .... but when i use that in cmd it works GOOD :) Here is my Code: string PATH = @"" + Application.StartupPath + "\\kitty"; string KITTY = PATH + "\\kitty.exe"; string CMD = "enable\n" + SECRET + "\n"; string PARAM = " -" + rAccess.ToLower() + " " + USERNAME + "@" + HOST + " -pw " + PASSWORD + " -cmd " + CMD; Process proc = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = false; startInfo.RedirectStandardInput = true; startInfo.UseShellExecute = false; startInfo.FileName = KITTY; startInfo.Arguments = PARAM; proc.StartInfo = startInfo; proc.Start(); PLZ Help thank you ;) moatamedi - Sat 13/12/2014 16:07:44 CET +0100
Hi Again
I find this damn for auto logon to Cisco Devices: string CMD = "enable\"\n" + EnablePass + "\"\n"; //use this template exactly and put your Enable Password kitty.exe -ssh admin@1.1.1.1 -pw pass -cmd CMD; moatamedi - Sat 13/12/2014 17:13:53 CET +0100
Hi Again X2
in C#: string CMD = "enable\\n" + EnablePass + "\\n"; //use this template exactly and put your Enable Password kitty.exe -ssh admin@1.1.1.1 -pw pass -cmd CMD; Answer |
||
|
Wiki utilisant PumaWiki 1.0, merci aux membres de la PuTTY Team 2026/06/16 11:11 -- en -- 216.73.216.42 -- |
||