VPS terminal access permissions denied

I have a VPS at linode. I am trying to access the vps through terminal using my login name and password. It calls for my password, I enter it and it says “permissions denied”. How to overcome this?


Hello @dougc and welcome to the forums!
As a general rule, the VPS accepts the user root for login in the beginning. Therefore your SSH connection command over terminal should look like:

ssh root@x.x.x.x

Where the 4 Xs are the IP address of your Linode VPS.

Yes, I tried that but it keeps telling me “permission denied”. I conteacted linode and they said something about creating a ssh key. Still trying to figure that out. Thanks so much for getting back to me

Ah, yes. I just helped a lady exactly with that issue. Thankfully, we’ll have two videos on SSH popping on the LMS this week, and one of them is for the keys.

The short method to create a key is the following (terminal):


It will ask you for a few information, but you can go with the defaults. You might want to give a passphrase so that you have extra security for your key.
Once the generation is complete, type:

ssh-copy-id root@x.x.x.x

This will ask you for your root password and install the key.

So, next time you perform:

ssh root@x.x.x.x

You may only get to input the password for your key (the earlier passphrase) and you’ll be good to go!

Remember to change the x.x.x.x with your Linode VPS IP. :slight_smile:

1 Like

use this lines if you still don’t have a ssh key generated
paste it on terminal. the first one creates a key for you without password but with a good encryption, the second command actually displays the key content. copy this info and paste in your vps control panel or support.

ssh-keygen -o -a 100 -t ed25519 -C "your@email.com" -N '' -f ~/.ssh/id_ed25519 <<<y >/dev/null 2>&1
cat ~/.ssh/id_ed25519.pub
1 Like

I’m having a related problem, I think. We have an old computer in our office that is solely used for video purposes, connected to a flatscreen TV. It has a wireless keyboard and mouse, but they aren’t very convenient to use, largely because from my preferred chair, I can’t see fine print on the TV: I have to move closer. I want to control it from my chair, which is in front of my computer. When I try to use ssh to access the TV’s computer, I get connection refused. If I can’t ssh into the computer, can I still generate keys for it? Do I need to install ssh on the TV computer maybe? Or what else could be the problem?

It appears that the TV computer doesn’t have an SSH service installed or running. That’s what needs to be done in order to allow remote control. As far as memory serves, the SSH is enabled via the “Windows Additional Features” part.

Guess I should have mentioned that the TV computer is running Linux Mint Cinnamon, not Windows. How do I install SSH there?

Easy, you can open up a terminal on the target computer and type:

sudo apt update
sudo apt install ssh

I selected the update first, so that all the databases are up to date with the latest versions.

Once the SSH is installed, then type in:

sudo systemctl enable --now sshd

Then type in:

hostname -I

Generally, the first IP address that pops is the local one to the system you’re on. Let’s say the address is X.X.X.X. Then you’ll need a username and password for that system. If you already have them, then simply return to your normal system and execute:

ssh username@X.X.X.X

Where your username is the actual username of the computer and the X.X.X.X is the IP address you picked up earlier.

Thank you, @vasileios. It took me a while to get to doing it, but that fixed my problem. I appreciate your help so much!

1 Like

It’s my pleasure, @PrettyGranny ! Enjoy! :slight_smile:

Vasileios, I finally got around to subscribing to Linode. I was successful at creating a VPS at their servers in Atlanta, GA. A lot of magic happened in the process that I still don’t understand; but to begin with I was following the text sheet that followed Will Welker’s LMS video and I got to the point of creating a new user called Mike19. Logged out and back in using those new credentials successfully, but couldn’t proceed beyond that. Keep getting “permission denied” when I try to copy the ssh keys over.

mike19@localhost:~$ usermod -aG sudo mike19
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.
mike19@localhost:~$ sudo cp -R /root/.ssh/home/mike19
[sudo] password for mike19:
cp: missing destination file operand after ‘/root/.ssh/home/mike19’
Try ‘cp --help’ for more information.

I think the original user was “root” and that it no longer exists???
Would appreciate any ideas…
Thanks, Mike

Hey @Mike19!
Yes, the commands to setup a VPS server assume you run on root privileges. The command to become root (on a Debian/Ubuntu-based server) is:

sudo su

Once you perform that, then all the remaining commands will not need a sudo.
To exit root, you can simply execute:



OK, I’m still working on creating my own website. I have a Linode set up, have successfully changed the permissions, and now can log in via my user name Mike19. I installed Cyberpanel and set the DNS to my web page at talon65.cloud:8090/ on Friday. Went back to Namecheap and set my custom dns to ns1.talon65.cloud and ns2 as well on Friday. Can’t connect this morning (Monday) to the webpage. I was thinking enough time had elapsed for everything to be in sync. Either that’s not the case, or I screwed something up along the way. I asked the help chat at Namecheap if I needed to give them my ip address and they said it wasn’t required. That seems strange to me since I don’t understand how they are going to come into sync that way.

Sorry to bother you again. I realized that Namecheap had listed my domain as talon65.online instead of talon65.cloud. I think that I have successfully got everything realigned now. I’ll wait the requisite 48 hours to see if that syncs everything up. Thanks for being there. You’re right, it is a process - baby steps…

1 Like

Here is a copy of my records page for talon65.online. I have tried to delete all references to talon65.cloud in Cyberpanel. I can’t seem to delete the talon65.cloud from Namecheap under the custom dns section. It keeps coming back up after I delete it. If my A records page is correct, then maybe things will sync. Thanks

1 Like

Bravo on getting through those setup details @Mike19!
On your DNS records, you can safely delete the extra copies of the ns1 and the ns2. You only need one set of each. From there on, how do your TXT records look?

Thanks Vasileous, I’ve successfully gotten past all the bumps in the road and am now able to sign in to my browser with the ssl certificates in place. One more quesion came up. I think I got out of sequence on setting up the ssl certs, so I just redid it. I’m guessing the earlier certificates were just replaced? Oh, another question… I screwed up and set up Cyberpanel with the default password and user name of admin. How can I go back and change those to something more secure?
I’m now going on to installing word press, hopefully smooth sailing from here on out.
Thanks again for the great walk-through pdf.

Not so fast!!! I got Wordpress installed with under construction and simple ssl installed. I started on setting up the email, but this is going to be a real learning experience! I checked both the LMS video and the accompanying pdf and I can’t find where you installed Mozilla Thunderbird, is that on Cyberpanel or Wordpress or from a command line?
The Cyberpanel forums have some good tips, but I couldn’t find that one.

PS: I went ahead and installed thunderbird to my server using the command line. Can’t see that made any difference to cyberpanel or wordpress??