1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

How to set ssh key on Windows

Last updated at Posted at 2017-08-05

Since Windows cmd can't use ssh command, and I failed many times to set up key when use PuTTY, so I recommend use the OpenSSH for Windows to set up your key.

Install OpenSSH

  1. Go to the OpenSSH for Windows download page
  2. Choose Binary Installer Releases
  3. Download the .zip file
  4. Extract zip file and install it

Confirm installation is success or not

  1. Open command line (If you don't know how to open it, you can use windows key + R and input cmd then click OK)
  2. Input ssh then you will see some usage of ssh command
ssh.PNG

Create the key pair

  • Open command line
  • Enter to target folder. eg: cd C:\Users\<User Name>
  • Input ssh-keygen -t rsa , you will see the message like below
Generating public/pricate rsa key pair.
Enter file in which to save the key (/c/Users/<User Name>/.ssh/id_rsa):
Created directory '/c/Users/<User Name>/.ssh'.
  • It will asking you a password for the key when access, if you don't want to use pass word, just pass it (enter twice). The message will like:
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/<User Name>/.ssh/id_rsa.
Your public key has been saved in /c/Users/<User Name>/.ssh/id_rsa.pub.
The key fingerprint is:
88:55:55:ff:ff:99:aa:e1:f4:a0:01:43:4e:e8:bc:ff <User Name>@desktop

Access git server

  • Access server that confirm your key is set up success ssh <username>@<server host name>
  • First time to access server after set up the key, you will see the message as below
The authenticity of host 'host name(IP address)' can't be established.
RSA key fingerprint is 80:5f:25:7c:f4:90:aa:e1:f4:a0:01:43:4e:e8:bc:f5.
Are you sure you want to continue connecting (yes/no)?
  • Input yes , and enter your server password
  • Then you will enter to server !
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?