Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

[Solved] Install SSH Key Pair on CentOS and Putty on Windows

General questions about VestaCP
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
boxygen
Posts: 23
Joined: Tue Aug 21, 2018 7:54 am

Os: CentOS 6x
Web: apache + nginx
[Solved] Install SSH Key Pair on CentOS and Putty on Windows
  • Quote

Post by boxygen » Tue May 05, 2020 7:34 pm

I had to spend hours and hours on internet to find a way to install SSH Key Pair for SSH Login on CentOS Server.

1. Login SSH as root
2. ]# ssh-keygen -t rsa
See this https://phoenixnap.com/kb/how-to-genera ... y-centos-7
3. It will create private and public key with the name you give in the current folder. In my case file name I gave is private_key so it creates 2 files private_key and private_key.pub
4. ]# cp private_key.pub .ssh/authorized_keys
The above command will copy the public key to authorized_keys.
5. ]# chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
6. ]# nano private_key
7. copy the text using mouse right click.
8. Paste the private_key in NotePad file private_key.txt
9. Open command prompt in Windows.
10. >puttygen private_key.txt -o private_key.ppk
11. This will convert the private key to putty format.
12. Now create a session in Putty and Under the Auth tab add the private_key.ppk file.
13. Now you can loging without password and using the
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: [Solved] Install SSH Key Pair on CentOS and Putty on Windows
  • Quote

Post by grayfolk » Tue May 05, 2020 8:06 pm

Also you can generate key pair via Puttygen and paste public key to ~/.ssh/authorized_keys
Puttygen will create .ppk immediately.
Image
Top

boxygen
Posts: 23
Joined: Tue Aug 21, 2018 7:54 am

Os: CentOS 6x
Web: apache + nginx
Re: [Solved] Install SSH Key Pair on CentOS and Putty on Windows
  • Quote

Post by boxygen » Sun Jun 14, 2020 5:57 pm

With Google Compute Engine there are some restrictions.
It doesn't allow root login. Instead it creates a default user that is your email id without gmail.com.
From Compute Engine Instance when you click on SSH it opens Linux Terminal with the same user.

Here now you have to repeat the same process as mentioned in Post # 1.
Top

sabasty
Posts: 1
Joined: Sat Dec 12, 2020 6:27 pm

Os: Debian 6x
Web: apache
Re: [Solved] Install SSH Key Pair on CentOS and Putty on Windows
  • Quote

Post by sabasty » Wed Dec 16, 2020 10:24 am

Thank so much for the detailed solution I have had similar issues on droplet running on digital oceans. I posted on the forum so I could get help for my website only for post to be deleted twice by mods, making me wonder if this community is still providing value as they really say. I'm glad you you provided a good solution.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password