25

When ssh-ing using putty, I sometimes mistype my username, and hit Enter before I realise my mistake. Once prompted for a password, is there a way to go back and re-enter my username rather than having to close the console and open a new one?

8

You can right click on the title bar of putty and select "Duplicate Session". This opens up a new window with the same settings, letting you re-enter a username and password. This works assuming that you did not specify a user name in the putty host name configuration (using just the hostname instead of user@hostname). This might not be exactly what your looking for but it's better than re-opening and setting up putty from scratch.

  • 1
    This is another useful tip, and would save me from reopening putty from scratch. However, I'm already using putty connection manager (tabbed putty!), so my current process is to just load the connection again from the list on the RHS. I was hoping for a keyboard shortcut so that I wouldn't have to reach for my mouse. Thanks anyway! – Cam Jackson May 9 '11 at 2:51
8

My current keyboard-only method for this, using Putty Connection Manager:

Ctrl+U:         Duplicate session
Ctrl+Shift+Tab: Back to tab with incorrect username
Ctrl+D:         Close tab with incorrect username
Ctrl+Tab:       Back to new tab, re-enter username
  • +1 Sadly though this does not work on Putty, still looking for a "mouseless" solution there ^^ – Levit Jul 18 '14 at 9:02
2

The Simple way would be to enter Ctrl+C which would close the session. Then right click and restart the session.

The advantage on this would be that you don't need to open a duplicate session / window.

  • I use Linux now but from my Windows days I recall PuTTY may close the window while closing the session. There is an option to keep the window open. – Kamil Maciorowski Jan 4 '17 at 22:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.