SSH login to the target server from Windows with a click of a shortcut

This is a method of logging in without being prompted to enter the user name after setting up login using the public key certificate in Putty.

procedure

-Download Putty latest version --Installing Putty --Save the public key login settings from the Putty settings screen --Create a batch file to execute by specifying "Public key login setting" and "User" in Putty

Public key login settings

Create and save Putty settings as shown in the screen below.

putty0000.JPG

putty0001.JPG

Create a batch file to execute by specifying "Public key login setting" and "User" in Putty

Save the following file with a file name such as "fileserver.bat".

cd "C:\Program Files\PuTTY\"
start /B putty.exe -load fileserver -l username

The point of the above bat file is to call putty with start / B. The point is that the dos window does not remain after puttingty is started.

Bonus (How to set public key login on Linux server)

This is the setting method for logging in to the public key on the Linux side. Please do this with the user who wants to log in automatically.

Here, as a sample, it is carried out by the test user.

# .Move to ssh directory (create if not)
cd ~/.ssh

#Create a public / private key pair
ssh-keygen -t rsa -b 2048 -f `hostname`

#Check the created file
ls -la `hostname`*
# -rw------- 1 test test 1823 Feb 16 13:11 fileserver
# -rw-r--r-- 1 test test  397 Feb 16 13:11 fileserver.pub

# .authorized pub_Added to keys
cat `hostname`.pub >> authorized_keys
chmod 0600 authorized_keys

#Show private key> puttygen in Putty installation folder.Load with exe and save as ppk file
cat `hostname`

#Private key and authorized_Delete the public key posted in keys
rm `hostname`
rm `hostname`.pub

#Confirm file deletion
ls -la `hostname`*
ls: cannot access 'fileserver*': No such file or directory
test@fileserver:~/.ssh$

Finally

Previously, after launching Putty, you logged in by double-clicking on the saved settings and entering your username when logging in. However, by creating the above batch file and pinning it to the taskbar, I was able to log in to my favorite server immediately.

Recommended Posts

SSH login to the target server from Windows with a click of a shortcut
Log in to the remote server with SSH
The story of launching a Minecraft server from Discord
Try to create a battle record table with matplotlib from the data of "Schedule-kun"
screen and split screen with python and ssh login to remote server
[Linux] Copy data from Linux to Windows with a shell script
[Postgresql] SSH connection to the external DB server from the client
After all, the story of returning from Linux to Windows
A Python script that allows you to check the status of the server from your browser
Ssh connect to GCP from Windows
[Introduction to StyleGAN] I played with "The Life of a Man" ♬
From the introduction of JUMAN ++ to morphological analysis of Japanese with Python
[Python] Create a program to delete line breaks in the clipboard + Register as a shortcut with windows
Output the result of morphological analysis with Mecab to a WEB browser compatible with Sakura server / UTF-8
[Introduction to Python] How to sort the contents of a list efficiently with list sort
Edit the file of the SSH connection destination server on the server with VS Code
Verification of how to periodically execute a script on a Linux server on Windows
Introduction and usage of Python bottle ・ Try to set up a simple web server with login function
Get the average salary of a job with specified conditions from indeed.com
Create a command to search for similar compounds from the target database with RDKit and check the processing time
Feel free to write a test with nose (in the case of + gevent)
To output a value even in the middle of a cell with Jupyter Notebook
I failed to install django with pip, so a reminder of the solution
The story of switching the Azure App Service web system from Windows to Linux
How to get a list of files in the same directory with python
I tried to create a model with the sample of Amazon SageMaker Autopilot
[Introduction to Python] How to get the index of data with a for statement
Send a message from Slack to a Python server
How to calculate the volatility of a brand
Change the decimal point of logging from, to.
Pretend to be a server with two PCs
POST images from ESP32-CAM (MicroPython) to the server
Save the object to a file with pickle
From the introduction of pyethapp to the execution of contract
The story of moving from Pipenv to Poetry
[Wagtail] Add a login page to the Wagtail project
I tried to make something like a chatbot with the Seq2Seq model of TensorFlow
From the initial state of CentOS8 to running php python perl ruby with nginx
A story that failed when trying to remove the suffix from the string with rstrip
A real way for people using python 3.8.0-2 from windows to work with multibyte characters
Get the value of a specific key in a list from the dictionary type in the list with Python
How to identify the element with the smallest number of characters in a Python list?
Extract images and tables from pdf with python to reduce the burden of reporting
The story of switching from WoSign to Let's Encrypt for a free SSL certificate
It was a little difficult to do flask with the docker version of nginx-unit
How to make a 3D geometric figure with one click [From triangular pyramid to fractal]
Find a guideline for the number of processes / threads to set in the application server
A memo on how to overcome the difficult problem of capturing FX with AI
A memo of misunderstanding when trying to load the entire self-made module with Python3
The wall of changing the Django service from Python 2.7 to Python 3
A memo connected to HiveServer2 of EMR with python
Calculate volume from the two-dimensional structure of a compound
Learn Nim with Python (from the beginning of the year).
A memo to visually understand the axis of pandas.Panel
Add information to the bottom of the figure with Matplotlib
Try setting SSH (Exscript) from the software to the router
How to create a submenu with the [Blender] plugin
Send log data from the server to Splunk Cloud
From buying a computer to running a program with python
Steps to calculate the likelihood of a normal distribution
Comparison of Windows Server and Free Linux to Commercial Linux