Need proper login criteria for Notepad++

petenorris

Active Member
Aug 9, 2022
30
3
8
Knoxville, Tennessee 37919 United States
cPanel Access Level
Root Administrator
Hello Forum

Question: Can someone tell me the right credentials for login in with FTP programs like Notepad++?

I h had earlier thought that the problem with the login was due to the incomplete or wrong glue settings in the DNS for the host domain name. But I think that I have got that problem resolved. Here is the thread for my earlier problem:
https://forums.cpanel.net/threads/how-to-fix-no-glue-for-nameservers.710845/#post-2986697

I am using the same username and password that I use to log into the WHM control panel.

I am using the hostname for the WHM control panel. The error message (see image below) says that the hostname is not recognized. That's odd. The hostname that I am using in the Notepad++ Profile settings is exactly the hostname shown on the WHM control panel.

Below are screenshots for Notepad++ Profile Settings for login credentials (the below credentials won't work):
login.JPG

Here is the error message that I get in the window at the bottom of the screen using Notepad++
failure.JPG

Here is the WHM control panel:
whm.JPG

I would appreciate any help with my problem.

Thank you in advance.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,651
2,635
363
cPanel Access Level
Root Administrator
Hey there! Is it possible your local workstation doesn't have the updated DNS records yet? It would seem the application isn't able to find the host, so it isn't a problem with the authentication.

If you try the IP address, does that work?
 

petenorris

Active Member
Aug 9, 2022
30
3
8
Knoxville, Tennessee 37919 United States
cPanel Access Level
Root Administrator
cPRex;

Thanks for responding.

I have got a desktop and a laptop. Both computers are doing the same thing.

I tried using the IP address on my laptop. It still won't connect. I'm using Notepad++. I got a different message than the one using the domain name.
notepad.JPG

I tried to connect using the IP address (also on my laptop) with the Putty program. I got a similar message as the Notepad++ message.
putty.JPG

I would appreciate if there are any more suggestions.
 

rbairwell

Well-Known Member
May 28, 2022
117
49
28
Mansfield, Nottingham, UK
cPanel Access Level
Root Administrator
Okay, that's a different error. You'll need to setup an SSH key for authentication (as by looks of things, you have turned/left on WHM->Security Center-> SSH Password Authorization Tweak (i.e. only allow SSH - including SFTP - access using SSH keys pairs). It'll be easier, but probably less secure, to just turn that to "Enable Password Auth"...

As you are on Windows and using PuTTY, launch PuTTYgen (you may need to download it if you didn't use the "Package Files"). Once PuTTygen has launched, click "Generate" to generate a new key pair (ED25519 is the newest/fastest, but ECDSA is more supported and RSA is the "most supported) and then you'll be prompted for the Key Comment (I usually use my machine name and the current date) and a passphrase (password).

Save the "Private Key" to somewhere on your machine (when I used PuTTy, I saved it as C:/Users/myusername/.ssh/puttykey.ppk ). Since you are using Notepad++ - you'll need also select Conversion->Convert to OpenSSH and save that key (perhaps with an ending of .openssh )

Copy the "Public Key for pasting into OpenSSH" bit at the top and you can then add that key and then authorize via:
* root level: WHM->Security Center->Manage root's SSH keys -> Import Key (do NOT upload the private key or enter the passphrase)
* cPanel user level: Home->Security-> SSH Access->Manage SSH Keys (again, import the public key and do not upload the private key or enter the passphrase)

In Notepad++, select "Try private key file authentication: yes" and under "Private Key File" select the OpenSSH key and that should help (you'll need to provide the passphrase/password as earlier). I've not used Notepad++ myself and haven't used PuTTy since around 2019 when I moved over to Windows OpenSSH client (which I did document if it helps)

You might find the following articles helpful:
* SSH Access | cPanel & WHM Documentation
* https://support.cpanel.net/hc/en-us/articles/360051594713-SSH-as-a-cPanel-user
* https://support.cpanel.net/hc/en-us/articles/14087064261271-How-to-SSH-using-Putty-with-a-public-key
 

petenorris

Active Member
Aug 9, 2022
30
3
8
Knoxville, Tennessee 37919 United States
cPanel Access Level
Root Administrator
cPRex, rbairwell;

Thanks to responding to my question.

I think the problem has been, or currently is, that the server (Lightsail) has got a firewall that's blocking access. I need to learn more about the firewall. I also need to study up and learn more about the public key and private key topics.

Thanks again.
 

rbairwell

Well-Known Member
May 28, 2022
117
49
28
Mansfield, Nottingham, UK
cPanel Access Level
Root Administrator
If it was a firewall issue, you'll get an error like "Connection Failed": however, since you are getting an Authorization Failed message (and even the logs showing your PC is connecting to the server, trying something and then disconnecting) indicates to me that this is NOT firewall related (unless the firewall is being really odd/unusually configured).

I think it would be easier for you to go to WHM->Security Center-> SSH Password Authorization Tweak and set "Enable Password Auth".
 

petenorris

Active Member
Aug 9, 2022
30
3
8
Knoxville, Tennessee 37919 United States
cPanel Access Level
Root Administrator
rbairwell;

Thanks for touching bases.

I figured out the problem. It was the permissions in the /home folder. That was the reason for the access denial.

I went to the WHM -> Server Configuration -> Terminal and changed the permissions for the/home folder to 755. I also had to change the permissions on the public_html subfolder folder and the domain subfolder.

I found a Linux guide that has instructions on how to change permissions.

This problem had had me confounded for a week or longer. Finally, I can move along to other things now..

Thanks again.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,651
2,635
363
cPanel Access Level
Root Administrator
I would not expect you to have to change permissions to get the access working for an FTP client. Changing /home in general can make your server less secure, so I'd recommend not using that tool or finding another workaround instead of leaving the permissions at 755.