DanHawker Posted August 12, 2009 Share Posted August 12, 2009 Hi All, Am attempting to put together a quick front-end to enable the team here to access our UNIX boxes from PuTTY. We use a SSH gateway and bastion host arrangement, so to login to a server, you need to access the GW, then the bastion and finally the server. Obviously lots of typing of the same details is required and is obviously prone to error. Have got something that works (simple GUI with hostname, username and password fields) however I need the password field to support all and any characters (we have quite a stiff password policy), so for instance Ev!lPassword. If I hardcode the password in (for testing) I can get it to work by simply using Send() and escaping any random characters (eg Send("Ev{!}lPassword{ENTER}"), however this isn't how it is entered in the GUI so it doesn't work the same. Have tried... Send("Ev!lPassword" & "{ENTER}"), adding the raw flag and other permutations to try and get it to work, but without success. Is there a way of escaping the entire string to then place into Send(), or is there some other mechanism to make this work (convert to ASCII and send the lot as an ASCII string for example). I suppose you could get it to iterate over the entire string, escaping specific chars, but that seems very kludgy to me. Any ideas??? Thanks Dan Link to comment Share on other sites More sharing options...
Alek Posted August 12, 2009 Share Posted August 12, 2009 Send($Password,1) Send("{ENTER}",0) [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
DanHawker Posted August 12, 2009 Author Share Posted August 12, 2009 Send($Password,1) Send("{ENTER}",0) Doh!!! (hitting head with hand) Didn't realise it was that simple. Read the bit about sending it raw, but kept including the {ENTER} too. Thanks Alek Dan Link to comment Share on other sites More sharing options...
preethiraj Posted January 23, 2018 Share Posted January 23, 2018 On 8/12/2009 at 8:51 PM, Alek said: Send($Password,1) Send("{ENTER}",0) Thankyou Alek. you solved my big problem. Link to comment Share on other sites More sharing options...
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