Saving your PuTTY username and password in a Windows Shortcut

Saving your PuTTY username and password in a Windows Shortcut

Last updated on

In this guide we will create a Windows shortcut which will store our PuTTY session information so that we don’t have to enter the username and password every time we log in. If you haven’t already installed PuTTY, you can download it from putty.org

1. Create Windows Shortcut

Begin by creating a Windows Shortcut.

Right-click the Desktop, select New and Shortcut.

Click Browse and navigate to the PuTTY folder.
It’s usually located in C:\Program Files\PuTTY or C:\Program Files (x86)\PuTTY

Select putty.exe, click OK and Next.
Enter a name for you shortcut. e.g. LinuxServer and click Finish.

2. Edit Shortcut

Right-click on your new shortcut and click Properties.

Take note of the Target field. It shows the path to putty.exe in Program Files. We are going to add a switch to this.

After the double quotes, paste in the following

-ssh [email protected] -pw PaSsWoRd

Replace john with your username, 192.168.1.10 with your server IP and PaSsWoRd with your own password.

The Target field should now look something like this. (Your path may differ depending on where putty.exe is installed.)

"C:\Program Files\PuTTY\putty.exe" -ssh [email protected] -pw PaSwOrD

Click OK and you’re done!

Now when you double-click the shortcut it will bring you straight into your Linux server without having to enter username or password.

Consider Key-based Authentication

Storing your password in a Windows shortcut is not very secure though, is it?

As well as offering additional security, SSH key authentication can be more convenient than the more traditional password authentication. SSH keys can allow you to connect to a server, or multiple servers, without having to remember or enter your password for each system.

Disable Sudo Password Prompt or Extend Timeout in Linux

Every time you issue a sudo command, Linux asks for your user password after a certain inactivity timeout, usually 5 minutes. This is the recommended behaviour to prevent unauthorised commands being run by someone or a malicious script in your absence. However, this requirement can be disabled per session or permanently, or you can extend the inactivity timeout.

VNC via a PuTTY SSH Tunnel

If you’re using Ubuntu, I’ve written a guide for installing a VNC server and connecting to it through a secure SSH Tunnel using PuTTY. 😎

Xfce default Desktop via VNC

1 Star2 Stars3 Stars4 Stars5 Stars 5.00 (5 votes)

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

19 replies

avatar
  Subscribe  
newest oldest
Notify of
morad sherif
Guest
morad sherif
morad sherif
2 months ago

Thank you, Edit Shortcut work with my win10 laptop.
Regards,

Norm
Guest
Norm
Norm
9 months ago

I would like to enter my session (“Cole”) details (user name “ME”, password “234”); then on the next screen enter my details (user name “ME”, password “567”). then with the same defined pages, enter there parameters and set to download in excel (3 pages in total) using excel vba.
is this possible?

Nilesh
Guest
Nilesh
Nilesh
9 months ago

It works good, thanks

Patel Anjali
Guest
Patel Anjali
Patel Anjali
11 months ago

Thank you so much with this el i m able to save my password

Andhi Irawan
Guest
Andhi Irawan
Andhi Irawan
1 year ago

how do you open it directly to the destination folder, for example \var\www\test\

UD
Guest
UD
UD
1 year ago

How to input PaSwOrD having double quotes in it ( ” ) ?

Alexander
Guest
Alexander
Alexander
1 year ago

Thank you for this!!!

JD
Guest
JD
JD
1 year ago

this works very well but is there a way to setup logging for the shortcut’s after doing this?

andy
Guest
andy
andy
1 year ago

Thank you for this. I had a profile setup with custom colors and font, is there a way to use this saved name/password with the custom colors/font?

Sachin Gupta
Guest
Sachin Gupta
Sachin Gupta
1 year ago

Thanks for post, is there way to save password for multiple host?

Frank Garrett
Guest
Frank Garrett
Frank Garrett
1 year ago

windows 10 gives an error message about invalid path & won’t allow the change.

Frank Garrett
Guest
Frank Garrett
Frank Garrett
1 year ago

Nevermind fix problem.

robbie
Guest
robbie
robbie
2 years ago

yes this helped a lot, what would be even better is automate task with this add on now.