Auto-login with Putty.exe
Solution 1
I post my comment as answer too so the question can be marked as solved:
Are there special characters on your username or password? Command line might interpret them wrongly and send wrong symbols to the server.
Solution 2
I suggest to rather configure SSH keys authentication than login credentials remembering.
It's not that much complicated:
- Generate a key with PuTTYgen.
- Put you public key to RedHat server.
- Add private key to PAGEANT.
- Setup PuTTY.
Related videos on Youtube
Bak Itzik
Updated on September 18, 2022Comments
-
Bak Itzik about 1 year
I have Windows 7 running on my PC, and am using
Putty.exe
to connect to Red-Hat server, somewhere along the network. Usually, I double-click thePutty.exe
file, choose a session, and press 'open'. Then I entered my username and password, and was ready-to-go. I want to automate this process.So, I've done some reading (even on similar questions asked over here), and tried the command-line approach. In the command line I typed in:
Putty.exe myusername@myserver -pw mypass
But got "putty Fatal error": 'unable to authenticate' error.
I'm guessing that I'm using the SSH protocol, trying to connect from the command line, but don't know which SSH (1 or 2), and don't think it matters. I've read about private-key/public-key method, but as for now - I want to stick with the username/password method.
Thanks to Celeritas' comment, I've tried to used auto-login method in Putty window - but got only 'Auto-login username' field, and not 'Auto-login password'. Also worth mentioning is the fact that I've got only the
Putty.exe
file, and without other helping tools, such asPuTTYgen.exe
.Thank you.
-
Celeritas almost 8 yearsSee here superuser.com/questions/999936/…
-
Bak Itzik almost 8 yearsThanks, but no help from there. Updated my Q to explain.
-
Madoc Comadrin almost 8 yearsAre there special characters on your username or password? Command line might interpret them wrongly and send wrong symbols to the server.
-
Bak Itzik almost 8 years@MadocComadrin: Thank you! You solved it. I had '&' in the password. Once I encapsulated it with "" - it worked. (And now everybody knows one char in my pass :)
-
-
Bak Itzik almost 8 yearsThanks, but it already solved by @Madoc Comadrin. Stupid 'special character' problem. And as I wrote - I don't have PAGEANT, nor the willing to setup private/public key right now.