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.
-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
Create and save Putty settings as shown in the screen below.
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.
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 [email protected]:~/.ssh$
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.