1

Novice question here.

I've setup an ubuntu server on an old desktop I have. On the server, I've created a user and gave it sudo privileges. When I use PuTTY, if I enter the ip address to login, I can get in no issue. But when I try to log in to the hostname (which was setup via no-ip) I get Access Denied.

To clarify, if I login to username@ipaddress, I get prompted to enter the password and boom I'm in.

But, if I do username@hostname, I get prompted to enter the password and I get "Access Denied".

I know it must be an issue on the no-ip side, but I can't figure it out. Any tips? Thanks in advance!

EDIT: The server is connected directly to my home modem, not to a router. The laptop I am trying to connect on happens to be on the same network right now, but through the wifi router as opposed to physically to the modem. But that will not always be the case. I'd like to be able to access the server from outside my home network.

  • @user68186 Thanks, I've edited the post. – Nick M Sep 7 '17 at 2:51
  • Does your home modem have an admin interface? Can you get to it from inside the network on Port 22 to get to an SSH system? Does the home modem offer you a port-forwarding option on it? – Thomas Ward Sep 7 '17 at 2:59
  • @ThomasWard I do not see any port forwarding option in the interface. You've lost me in the technical speak. What do you mean when you ask if I can get to it from port 22? – Nick M Sep 7 '17 at 3:09
  • @NickM from inside the system, can you try SSHing to the IP address of the modem (from inside the network), and see if it gives you a username and password prompt, rather than timing out and doing nothing? – Thomas Ward Sep 7 '17 at 3:10
  • When I try to do that, I get a message stating "Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1" – Nick M Sep 7 '17 at 3:16
2

There's two issues at play here, and both issues involve your modem.


Firstly, the modem itself has SSH access available. Granted, it's on an ancient key exchange mechanism, which is in itself a security risk, but there's nothing I can do about that here. This is what you're reaching when you SSH to the public IP address from externally on your network - the remote management shell for your modem.

Check your modem's management interface for "remote management" options, and see if there's an SSH option in there. If there is, disable it.


Secondly, the modem you specified does not have "port forwarding" it seems as an option. This is sometimes also listed as "NAT". If there's no port-forwarding capability for your modem and no way to customize how traffic is routed when it comes in from the outside on your modem to route it to internal systems rather than accepting the connection directly to the modem itself, there's no way to reach your server that is behind the modem.

(My guess is that the 'modem' is actually a router, oddly enough, but it's not uncommon for a modem and a router to be the same combined component on the consumer markets)

  • Thanks for your response. I'm not seeing any options for remote management. I do see a NAT option. I tried to add the ip address for the server into there, but I still seemed to get the same issue. My modem actually is a two in one, modem/router hybrid but I did disable the wifi portion of it in lieu of a separate router. – Nick M Sep 7 '17 at 4:13
  • @NickM I'd need to see a screenshot of your "NAT" page; you may need to turn on NAT and then it'll give a port forwarding option; but that is a little bit beyond the scope of Ask Ubuntu support... – Thomas Ward Sep 7 '17 at 4:15
  • Well, thanks for your help for the time being. It's definitely been a learning experience, I don't want to go out of bounds here. I appreciate you taking your time! Have a great night – Nick M Sep 7 '17 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.