Pergunta

trying to connect from localhost

  ssh <MyLogin>@localhost   - connected

trying to connect from another computer in my local network

  ssh <Mylogin>@<MyServerLocalIp>   - connected

trying to connect from internet

  ssh <Mylogin>@<InternetIp> -conection refused  (it not appears in my log file)

i'm check 22 port in this site http://www.canyouseeme.org/ - 22 port is open and it appears in my log file

trying use telnet

  telnet InternetIp 22  - not connected

but when i'm trying another port

  telnet InternetIp 21  - connected
Foi útil?

Solução

This sounds like you are behind a NAT Router.

If this is the case, what you will need to do is first ensure your machine has a static IP address. This will likely be something like 192.168.1.x. You can configure this in your router by either mapping your machines MAC address to a DHCP assigned address or just configuring you machine with a static IP and checking that that IP is not in the DHCP range.

Then you will need to configure your Router to forward inbound port connections to the local IP address of your machine. Here is an article on Wikipedia about Port Forwarding: http://en.wikipedia.org/wiki/Port_forwarding

Your best bet is to download the manual for your specific Router and look up the section on port forwarding. It is often in the section about the routers Firewall.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top