Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

SSH Login Using PuTTY without Typing Username and Password

July 3, 2024
in A, Blog, PuTTY
0
ADVERTISEMENT

Table of Contents

Login Using PuTTY without Typing Username and Password

Typing username and password every time you connect to a remote Linux system using PuTTY may be tired. In this post, we will show you how to create a Windows shortcut, which will store your PuTTY session information so that you don’t have to enter the username and password every time you log in.

SSH Login Using PuTTY without Typing Username and Password

1. If you haven’t already installed PuTTY, you can download it from chiark.greenend.org.uk or from the below direct links:

  • PuTTY 64-bit: https://tartarus.org/~simon/putty-snapshots/w64/putty-64bit-installer.msi
  • PuTTY 32-bit: https://tartarus.org/~simon/putty-snapshots/w32/putty-installer.msi

2. Create a Windows Shortcut by right-click on the Desktop then select New > Shortcut.

SSH Login Using PuTTY without Typing Username and Password

3. 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 then click OK.

SSH Login Using PuTTY without Typing Username and Password

4. Click Next.

SSH Login Using PuTTY without Typing Username and Password

5. Enter a desire name for your shortcut. e.g. MyLinuxServer and click Finish.

SSH Login Using PuTTY without Typing Username and Password

6. Now, right-click on your new shortcut and click Properties.

SSH Login Using PuTTY without Typing Username and Password

7. We are going to add a parameter to this. After the double quotes, paste in the following:

-ssh [email protected] -pw PassW0rd

Don’t forget to:

  • Replace bonben with your username.
  • Replace 10.10.5.77 with your server IP address or hostname.
  • Replace PassW0rd 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 PassW0rd
SSH Login Using PuTTY without Typing Username and Password

8. 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.

SSH Login Using PuTTY without Typing Username and Password

Using a batch file

Additionally, if you don’t want to create a shortcut, you can create a batch file with the same command when creating the shortcut.

Related: How to create a batch file on Windows.

jUTVOb4kxjMtaOQ6N0tkrLp4A0euwFXbhVBNjEmC4ne6tyCxNwba9BID4e1p

Key-based authentication

Storing your password in a Windows shortcut is not very secure. 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.

Generate Keys

1. We start the configuration at the client Windows computer. Download the latest version PuTTY Key Generator from the below link:
  • PuTTYGen: https://the.earth.li/~sgtatham/putty/latest/w64/puttygen.exe

Note: If you’ve installed PuTTY on your computer. The PuTTYGen already exist in C:\Program Files\PuTTY.

2. Using the PuTTYGen tool we have to generate an authentication key. This key will serve as a substitute for the password that will be entered during login.

GlRGyImP0kBgGkNU0xr3sBzQs3HnzQtTIARR1JaK7DIXdMA5gUKNSUOv5vQT

3. Leave the default selections and click on the button. The following window opens. Move mouse randomly over the empty space below the progress bar to create some randomness in the generated key.

4. You don’t enter any key phrase. Let’s click on Save private Key button. Click Yes on the window asking for confirmation for saving the key without a password then save the key file to a safe location.

5. Now, copy the public key then save it into a text file for later uses.

Configure the Linux server

1. Close PuTTYgen and open PuTTY then connect to the remote system using the user you want to use for future with password prompt. This time when you login, you have to provide the password at the prompt. Future logins won’t require this password.

2. Under the logged in user’s home directory create a directory named ~/.ssh using the following command:

mkdir ~/.ssh

3. Enter the below command to giving users (owners) read, write and execute permissions.

chmod 700 ~/.ssh

4. Now, create an empty text file named authorized_keys using your favorite text editor.

nano ~/.ssh/authorized_keys

5. Paste the contents of the public key that you’ve saved in the previous step into authorized_keys file, then save and close the file.

Note Tip: To save and close the file in nano editor, press > followed by > and then

6. Assign permissions only for the owner using the following command:

chmod 600 ~/.ssh/authorized_keys
RUL44yKalsw3Dp4TRgzcfjHQIF35tRw2QcvcqsXUDb4PwqMGfWvbGQRB6B2r

Finally, type exit to close the SSH connection.

Configure the PuTTY client

Now we have configured SSH server, it’s time to test our setup. 

1. On the client system, open PuTTY. From the left navigation, select Connection > Data. Enter the username as Auto-login username on the right panel.

2. Again from the left navigation menu, scroll down and expand Connection > SSH > Credentials. Enter the path of the saved private key file (In our case C:\privkey.ppk ). Leave other defaults as such and press Open button.

Now the PuTTY connects to the remote SSH server and there won’t be any password prompt.

QFbAt8DpRE1YFf1QAj7wqY9oRp4fY0AnAgMbsOHRuJpBDikggNkxVQo61GJc
ADVERTISEMENT

Not a reader? Watch this related video tutorial:

5/5 - (2 votes)
Previous Post

How to Change the Font Face on Windows Terminal in Windows 10/11

Next Post

How to Change the Theme or Color on Windows Terminal in Windows 10/11

Related Posts

Images Hidden Due To Mature Content Settings In CivitAI

August 31, 2024

Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

August 20, 2024

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024

How to Remove The Test Mode Watermark Without Disabling Test Mode

July 28, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory