Ysurac / openmptcprouter-vps

OpenMPTCProuter VPS scripts
GNU General Public License v3.0
161 stars 69 forks source link

Service Principal Name (SPN) problem #33

Open brackerp opened 4 years ago

brackerp commented 4 years ago

I am using a digitalocean droplet to run the VPS in and it runs fine and coust 5$ a month.

But after it is connected to router it will not allow a ssh connection.

This is a connection to a freshly set up vps 11:35:45.585 GSS key exchange algorithms ignored. Reason: Service Principal Name (SPN) is not set and it cannot be deduced from the host name. 11:35:45.585 Connecting to SSH server 161.35.50.224:65222. 11:35:45.705 Connection established.

Doing a port scan all the need ports are available.

This is after router connects.

11:49:34.385 Started a new SSH session. 11:49:34.413 GSS key exchange algorithms ignored. Reason: Service Principal Name (SPN) is not set and it cannot be deduced from the host name. 11:49:34.423 Connecting to SSH server 142.93.73.231:65222. 11:49:55.437 Connection failed. FlowSocketConnector: Failed to connect to target address. Windows error 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. 11:49:55.446 The SSH session has been terminated.

Doing a port scan all the need ports are not available.

How do I fix this.

This is a overview.

system

Ysurac commented 4 years ago

Check on a VPS the file /etc/ssh/sshd, I replace Port 22 and #Port 22 by Port 65222. It's possible that digital ocean change something. If you can connect to a VPS with the problem, check the result of netstat -laputen and check the line with sshd program name.

brackerp commented 4 years ago

netstat -laputen This is the responce.

Ysurac commented 4 years ago

So it's listening to correct port. Firewall config seems good, else the router would not be able to connect. You can check log about ssh connections. And check that there is not another firewall that block port 65222.

Ysurac commented 4 years ago

I just tested a fresh install on Digital Ocean and I can connect to the VPS port 65222 without issue. Maybe a problem with VPS firewall rules, check on the VPS /etc/shorewall/rules

brackerp commented 4 years ago

ok

brackerp commented 4 years ago

rules1 rules2

This is in the file

Ysurac commented 4 years ago

All is ok. I tested your IP and SSH answer at port 65222:

ssh root@142.93.73.231 -p 65222
The authenticity of host '[142.93.73.231]:65222 ([142.93.73.231]:65222)' can't be established.
ECDSA key fingerprint is SHA256:sFzC7EbM1vn0N9ytR5dhjss8ofcRp7G2DuDRteMjVvs.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[142.93.73.231]:65222' (ECDSA) to the list of known hosts.
root@142.93.73.231: Permission denied (publickey).

Check if you don't have fail2ban or something like that installed and got banned, or try another SSH client.

brackerp commented 4 years ago

i will work on this Friday have to do day job

On Wed, May 20, 2020 at 2:17 PM Ycarus (Yannick Chabanois) < notifications@github.com> wrote:

All is ok. I tested your IP and SSH answer at port 65222:

ssh root@142.93.73.231 -p 65222 The authenticity of host '[142.93.73.231]:65222 ([142.93.73.231]:65222)' can't be established. ECDSA key fingerprint is SHA256:sFzC7EbM1vn0N9ytR5dhjss8ofcRp7G2DuDRteMjVvs. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[142.93.73.231]:65222' (ECDSA) to the list of known hosts.root@142.93.73.231: Permission denied (publickey).

Check if you don't have fail2ban or something like that installed and got banned, or try another SSH client.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ysurac/openmptcprouter-vps/issues/33#issuecomment-631672857, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIB3WJFRTY2D4JJ7QRTEPDRSQUFNANCNFSM4NGEN5QQ .