# can`t connect with ssh through router over no-ip [solved]

## playahater

I have adsl siemens speedstream router .. i have a small lan (4 computers) connected to that router and everything works inside lan perfectly ..

now, i need to connect to my computer over ssh from distance .. from computer at work for example

1. First of all, i am not sure how no-ip works .. 

i need something which is going to send my current IP address to mail .. 

i have opened no-ip account, added a host/redirect and set up noip2 (added to default runlevel and made no-ip.conf) and nothing happend .. 

i have rebooted my router, my ip address has changed .. i have even restarted noip2 and nothing was sent to my mail .. 

when i try  "tailf /etc/no-ip.conf" I get 0.0.0.0 ??

what am i missing ??

2. BUT .. When i know my IP and when i try to login from local computer (one of those 4 computers) through ssh over no-ip to server which is the boss for lan, i get promted if i want to accept rsa key or something like that and after i get to the stage when i need to enter a password .. but i always get "Permission denied" even though that is correct password .. i can login with that password from lan .. 

what am i missing ??

i think i`m missing some little thing but i can`t figure it out ..  :Smile: 

10x in advance 

Cheers

----------

## playahater

OK . i think i have figured out the no-ip problem .. but i still can`t connect via ssh ..   :Crying or Very sad: 

10x in advance

----------

## HTS

Did you solve it? I would be kind of interested in doing the same.

HTS

----------

## playahater

well .. not exactly ..  :Smile: 

i have figured out how to set up fw but haven`t tried to login through ssh yet .. 

i think that when the fw is up and running, probably it is blocking port 22 .. and that port only need to be forwarded .. somehow ..   :Rolling Eyes: 

i`m not at home right now .. but i`ll post fw script asap

you have the same router as i do ??

Cheers

----------

## HTS

Actually, I solved my situation. I have a Linksys WRT54G router. I used DynDNS.org to redirect my IP.

I think this is the equivalent of your no-ip.

For the port, you're right. The default settings for ssh use the port 22, which needs to be forwarded by your router to the (local) IP of the PC that hosts the ssh server.

For my router I simply go to 192.168.1.1 in firefox then go to Port Range Forward.

You should have something similar.

Then I created a rule to forward any traffic coming into port 22 towards my 192.168.1.102 (my local IP).

I definitely think that would work for you too.

I even got X11Forwarding to work   :Razz: 

----------

## playahater

at the end .. it really was the fw who was not allowing me to login ..  :Sad: 

when i forwarded 22 port .. everything worked ..  :Smile: 

10x HTS ... :Smile: 

Cheers

----------

## HTS

I'm happy it worked for you too!

By the way, if you're interested in Desktop Sharing, try install x11vnc  server on linux machine and connect to it with tightvnc  client from any machine.

(On Windows you don't even need to install it it's just a small executable).

If you then tunnel the connection to the vnc server via ssh, it is totally secure.

This is really great to completely control your gentoo from a remote computer.

```
 echo "x11-misc/x11vnc jpeg zlib" >> /etc/portage/package.use 

 emerge x11vnc tightvnc

```

file: /home/user/.x11vncrc

```
forever 

localhost

xdamage

wf DarkGreen,1,5,32+8+8+8,all,0.15+0.30+5.0+0.125

wcr always

scrollcopyrect always

overlay

rfbauth /home/hts/.vnc/passwd 

display :0

```

Then run vncpasswd (select yes when asked for view-only password).

On kde, run 

```
ln -s /usr/bin/x11vnc ~/.kde/Autostart/x11vnc
```

You then need to configure the tunnel in the ssh client.

For ssh secure shell on windows:

Go edit your profile and select tunneling > add >

listenport 5900 desthost localhost destport 5900 allowlocalconnectionsonly no type tcp

You also need to forward the port 5900 to 5950 to your gentoo.

Have fun!

----------

## playahater

 *HTS wrote:*   

> I'm happy it worked for you too!
> 
> By the way, if you're interested in Desktop Sharing, try install x11vnc  server on linux machine and connect to it with tightvnc  client from any machine.
> 
> (On Windows you don't even need to install it it's just a small executable).
> ...

 

Woww .. 10x ..  :Smile: 

i`ll try that ..  :Smile: 

i have forwarded X for now .. and it is working .. byt have never used x11vnc  :Smile: 

10c again ..  :Smile: )

Cheers

----------

## HTS

 :Laughing: 

There might be a cock up in the tunnel and the listen port might be 5901 i'm not sure. Also, find all the howtos on google to help you if you're stuck or ask me here.

Good Luck

----------

