Click here for "Error Codes for Commercial Air Conditioners".

RockyLinux 9.1 ; SSH connection with public key

SSH connection with authentication using public key cryptography

Creation of public and private key pairs

Create a public/private key pair for a user connecting to the Linux server using OpenSSH.
Use ssh-keygen to create key pairs.
Creation of public/private key pairs is performed with remote login user privileges。
If you do not specify the destination and file name, id_ed25519 and id_ed25519.pub will be created in /home/(user name)/.ssh/. On the way, enter the password for the key.

Save the created private key id_ed25519 to an appropriate location on windows using winSCP.
Start Winscp

Host name  : Server IP Address
Port number : SSH port number
User name : Server Login User
Password : Password for the same user
Click "Save"
画像に alt 属性が指定されていません。ファイル名: 28d7c91e55e37b6580daa5ae22d4c0cb.jpg

Site name : Any name
Click "OK"
画像に alt 属性が指定されていません。ファイル名: 9b53ea99f4a94fce9b40b76482a6d8ad.jpg

After confirming the server, click "Login".
画像に alt 属性が指定されていません。ファイル名: 7f90bf235e4df57ea9f4c2165b9516fc.jpg

Click "Update" when the following screen appears
画像に alt 属性が指定されていません。ファイル名: 5a7168df0483b652c65acaac9ed13286.jpg

Password of the logged-in user in the Password field
画像に alt 属性が指定されていません。ファイル名: 8aa20c02f60c1dbc6c0dd5a83737b409.jpg

When connected, the right column is the server side and the left column is the PC (Windows) side.
Save the file "id_ed25519" in the .ssh directory to an appropriate location on Windows in the left column.
画像に alt 属性が指定されていません。ファイル名: 075ed9e39823f5b545a0549a4238c407.jpg

Editing SSH Configuration File

Edit the SSH configuration file to disable password authentication.
This time, instead of being an ordinary user, su - to become root.

How to connect with Tera Term

Start Tera Term, and select "File" menu "New connection"
画像に alt 属性が指定されていません。ファイル名: 48e6fd6615fad0b6d6915c6d4185cf00.jpg

Host : Server IP Address
TCP port : SSH port number

If you get the following security warning  Check "Replace...." and click "Continue".
画像に alt 属性が指定されていません。ファイル名: bfc146f61977dd87faa537b17aae6d6b.jpg

User name : Login User Name
Password : Password specified in the creation of a public/private key pair
Under "Use RSA/DSA/ECDSA/ED25519 key to log in", set "Private key file:" to "id_ed25519" that you just saved in Windows. and click "OK".
画像に alt 属性が指定されていません。ファイル名: 1bcd03aeb9214a703f56b9ccabae241f.jpg

Creating a private key using PuTTYgen

Start Winscp and launch [Run Puttygen] from [Tools].
Select the appropriate server
画像に alt 属性が指定されていません。ファイル名: 49c8695934c777b24c0dc2a54f76a355.jpg

Click Load
画像に alt 属性が指定されていません。ファイル名: 9d20ce6f9b4fa31eff4d23fc21f6f2c2.jpg

The [ Open File Dialog ] will open, change the file type to [ All Files (*. Change the file type to [ All Files (*. *) ] and load the private key id_ed25519 that was transferred from the Linux server.
画像に alt 属性が指定されていません。ファイル名: 130d698d50f60ba13ec0df4e2ac53a15.jpg

The password is the password set in "Creating a public and private key pair" above
画像に alt 属性が指定されていません。ファイル名: 6a190bc90b8eabb43058748714034e4e.jpg

画像に alt 属性が指定されていません。ファイル名: ca0ca4524e962f4af1120cacd0c8544e.jpg

Click on "Save private key"
画像に alt 属性が指定されていません。ファイル名: fcda61780fb190de26621a4e5e38940c.jpg

Save the file with the extension ".pppk" in the same place as "id_ed25519" saved earlier on the Windows side under the name "id_ed25519.pppk".
画像に alt 属性が指定されていません。ファイル名: 194ceaa640df36fd40220e72da4f5c8a.jpg

Select the appropriate server and click "Edit"
画像に alt 属性が指定されていません。ファイル名: 0b261f50c40248eb8b2971cac14b2de8.jpg

Click on "Advanced"
画像に alt 属性が指定されていません。ファイル名: 0deb533409c985aeed3c985c39830fe1.jpg

Open the "Authentication" menu and specify "id_ed25519.ppk" saved in Windows for "Private key file
画像に alt 属性が指定されていません。ファイル名: ce4768b632feb9afabf590167e40aaff.jpg
Click "Save"
画像に alt 属性が指定されていません。ファイル名: 292992894ff62b28f2d42131f084f186.jpg
Click on "Login"
画像に alt 属性が指定されていません。ファイル名: fcf564b151c4b6de29daa926cd1e11a1.jpg

The password is the password set in "Creating a public and private key pair" above
画像に alt 属性が指定されていません。ファイル名: 15744f289637bf936cfad9d9396396f3.jpg

When connecting with Tera Term, use the following
Use RSA/DSA/ECDSA/..." Specify "id_ed25519.ppk" saved in windows in the "Use RSA/DSA/ECDSA/..." field.
画像に alt 属性が指定されていません。ファイル名: a985d924af8483e774304f4fc845112a.jpg

タイトルとURLをコピーしました