#1 2018-01-24 16:02:01

toktok
Trusted Member
Registered: 2015-05-03
Posts: 3

ssh permission denied

Hi everyone
I just got a new machine in Los Angeles, with the external IP 98.143.1xx.xxx. I can access the machine from the control panel, but I cannot access when I try ssh [email protected] -p "portnumber". I get an error saying permission denied, try again. I created another user, I cannot access the user account either via ssh from outside. However, from the control panel I can ssh into the machine using the internal IP address and the new users credentials. So somehow I feel like there is a problem with routing from outside ip and the port to my VPS.

If anyone had an idea about how to solve this issue, I would be very happy to hear.


@edit: Remove Public IP.

Last edited by DavidGestionDBI (2018-01-24 17:25:55)

Offline

#2 2018-01-24 16:39:50

manjana
Trusted Member
Registered: 2015-11-23
Posts: 156

Re: ssh permission denied

What port number do you use and what's your internal IP?

Last edited by manjana (2018-01-24 16:40:21)

Offline

#3 2018-01-24 17:09:11

WSS
Trusted Member
Registered: 2016-12-22
Posts: 389

Re: ssh permission denied

From your introductory/activation email:

You have been assigned a range of 21 ports along with your NAT IPv4 address. (20 for services of your choice, 1 For SSH over IPv4)
The ports are based on the last octet of your IP.

For example:
Your INTERNAL IP is 172.16.70.133, your forwarded port range is: 13300 - 13320 (13300 is pre-routed for inbound SSH connection).  Non GDBI use a different port number, so that's probably what's confusing.

When this is resolved, please remove the public IP from your post.


RbyeR4Nm.png

Offline

#4 2018-01-24 17:50:31

toktok
Trusted Member
Registered: 2015-05-03
Posts: 3

Re: ssh permission denied

thanks for the answer. I used this information from the activation email.  Let me explain what i am doing. From outside I am running the command
"ssh [email protected] -p 13300"
and it ask my password, when I give it the response is permission denied.

However from the control panel, I can open up a console which starts at the root prompt. From there, (say my internal IP is 172.16.70.133)
"ssh [email protected]"
and it asks my password when I give it logs in. So internally I think all is fine.

I suspect the routed port 13300 in the email is not correct or there is something wrong with that.

any further thoughts are appreciated.

Last edited by toktok (2018-01-24 17:51:33)

Offline

#5 2018-01-24 18:13:21

manjana
Trusted Member
Registered: 2015-11-23
Posts: 156

Re: ssh permission denied

I'm not sure if you're really using port 13300 or if you're using it as an example.

So just for clarification: If your internal IP is aaa.bbb.ccc.ddd, you need to use ddd00 as SSH port.

Example: If 172.16.70.44 is your internal IP, you need to run "ssh [email protected] -p 4400"

Offline

#6 2018-01-24 18:17:22

toktok
Trusted Member
Registered: 2015-05-03
Posts: 3

Re: ssh permission denied

This did it. The port that was written in the activation email was wrong. The rule you gave above made it work. Thanks a bunch.

Offline

#7 2018-01-25 14:41:43

DavidGestionDBI
Provider-Moderator
From: Montreal, Canada
Registered: 2015-01-10
Posts: 648
Website

Re: ssh permission denied

The port given in the activation email is not wrong. IT'S AN EXAMPLE! It's even wrote above it.


-----------
David B. |  Technical Director at Gestion DBI ||  Want to receive our promotions?
IT consulting and Hosting Provider | 24/7 Technical Support

Offline

#8 2018-03-20 03:18:59

Hippopotamus
Trusted Member
Registered: 2018-03-20
Posts: 10

Re: ssh permission denied

The same problem.

1) Internal IP (called Main IP) from email is XXX.YYY.ZZZ.123
2) Using port 12300 in Putty and WinSCP, "Access denied". External IP for Montreal, Canada.
3) Everything is OK in web-based console. Changed root password and rebooted, no avail.

Last edited by Hippopotamus (2018-03-20 03:21:03)

Offline

#9 2018-03-20 04:00:28

Hippopotamus
Trusted Member
Registered: 2018-03-20
Posts: 10

Re: ssh permission denied

My error was to enter my hostname as username instead of "root"...

Offline

#10 2018-03-21 20:25:54

lemon
Trusted Member
Registered: 2015-08-27
Posts: 151

Re: ssh permission denied

h

Offline

Board footer

Powered by FluxBB