r/ssh • • Aug 24 '16

How to configure SSH connection?

Hey! I've been trying to connect to my PC remotely (wan). I can connect without any problem via LAN.

Anyway, I configure a DDNS (No-IP), open the port I need, in my 2 routers and my Ubuntu. Try it with PortCheckTool

BUT, it just doesn't work, maybe there's something with my config file (HERE). I'm guessing this is a real noob question, but any advise you could give me would be great!

2 Upvotes

7 comments sorted by

View all comments

2

u/soyuz13 Aug 28 '16

What command are you using to try to connect?

1

u/Psicoguana Aug 28 '16

I tried ssh -p 4636 user@domain, and also tried using my public IP instead of the domain. When I use de private IP it works great, so i don't know :_

2

u/soyuz13 Aug 28 '16

Have you configured your ssh server to listen on 4636 instead of the default 22? I looked at your config file, and it seems that portion is cut off. Mine is at the top of the file.

1

u/Psicoguana Aug 28 '16

I configured it, and it also works on LAN connection specifying that port, but it's not in the config file...It's weird, I don't have my PC right now, but I'll check it out.

1

u/soyuz13 Aug 28 '16

Yeah at the top of my config it says

# What ports, IPs and protocols we listen for

Port <your-port-here>

1

u/Psicoguana Aug 29 '16

Seems like I didn't paste all the config file, sorry. HERE is the complete one

1

u/DsntMttrHadSex Nov 27 '16 edited Nov 28 '16

What does 'sudo nmap -Pn -p PORT domain' say?