networking with ssh thru wireless

11,695

It might very well be routing issues on your TP-Link TD-8840. You need to add a static route (http://192.168.0.1 -> Advanced setup -> routing -> static route) where you route all traffic headed for 192.168.1.* via your wireless router address (192.168.0.n).

Another way to solve this issue is by disabling the DHCP server on your wireless router, making it an access point. Connect your main router as a 'client', not as 'wan', and then you'll get your IP and routing tables from the TP-Link router. The AP will no longer do IP routing but rather MAC routing (layer 2) and should not cause these issues any more.

Share:
11,695

Related videos on Youtube

nkvnkv
Author by

nkvnkv

Updated on September 18, 2022

Comments

  • nkvnkv
    nkvnkv over 1 year

    I am using Ubuntu 12.04 64bit on my desktop and my laptop. Have install openssh client and server on both of them.

    My desktop is connected to ADSL2+ Router TD-8840 with wired connection and has 192.168.1.1 IP address.

    My laptop is connected to 150Mbps Wireless N Router TL-WR741ND with wireless connection and has 192.168.0.1 IP address.

    ADSL2+ Router TD-8840 and 150Mbps Wireless N Router TL-WR741ND are connected with a wired cable by useing blue port for on wlan on TL-WR741ND.

    ifconfig from desktop

     desktop:~$ ifconfig 
        eth0      Link encap:Ethernet  HWaddr 00:1d:92:37:1f:3d  
                  inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
                  inet6 addr: fe80::21d:92ff:fe37:1f3d/64 Scope:Link
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                  RX packets:57508 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:44508 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000 
                  RX bytes:51547633 (51.5 MB)  TX bytes:6371374 (6.3 MB)
                  Interrupt:43 Base address:0x6000 
    
        eth1      Link encap:Ethernet  HWaddr 00:23:cd:b1:ff:e4  
                  UP BROADCAST MULTICAST  MTU:1500  Metric:1
                  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000 
                  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
                  Interrupt:22 Base address:0x8400 
    
        lo        Link encap:Local Loopback  
                  inet addr:127.0.0.1  Mask:255.0.0.0
                  inet6 addr: ::1/128 Scope:Host
                  UP LOOPBACK RUNNING  MTU:16436  Metric:1
                  RX packets:109 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:0 
                  RX bytes:12044 (12.0 KB)  TX bytes:12044 (12.0 KB)
    

    ifconfig from laptop

    laptop:~$ ifconfig 
    eth0      Link encap:Ethernet  HWaddr 00:a0:d1:65:2a:42  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:334 errors:0 dropped:0 overruns:0 frame:0
              TX packets:334 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:31244 (31.2 KB)  TX bytes:31244 (31.2 KB)
    
    wlan0     Link encap:Ethernet  HWaddr 00:19:d2:1b:19:81  
              inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::219:d2ff:fe1b:1981/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1590 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1276 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:874763 (874.7 KB)  TX bytes:315401 (315.4 KB)
    

    I can connect to desktop from laptop via ssh with no problem,

    internet connection on laptop and desktop is working fine,

    but when I want to connect to laptop from desktop via ssh in terminal I type

    ssh [email protected]
    

    and get

    ssh: connect to host 192.168.0.101 port 22: Connection timed out
    

    If anyone is able to point out whats wrong?

    • ctrl-alt-delor
      ctrl-alt-delor over 11 years
      your IP addressed are inconsistent. You say .1 at top and .101 else where.
    • ctrl-alt-delor
      ctrl-alt-delor over 11 years
      can you from laptop do ssh [email protected] and then ssh [email protected] and report on status.
  • nkvnkv
    nkvnkv over 11 years
    turned off dhcp on wireless, it registered at wired router with ip address 192.168.1.100 and ssh is working now, internet too. I just cant access setting wireless on 192.168.1.100 as i did on 192.168.0.1.
  • nkvnkv
    nkvnkv over 11 years
    turned off dhcp on wireless, it registered at wired router with ip address 192.168.1.100 and ssh is working now, internet too. I just cant access setting wireless on 192.168.1.100 as i did on 192.168.0.1.
  • Daniel Beecham
    Daniel Beecham over 11 years
    Right; forgot about that step. Your wireless router will have two interfaces, one of which it listens to HTTP traffic and one of which it's invisible. The invisible one got .1.100, the listening one however has a static IP which you've configured through the web interface. At this point it's still 192.168.0.1. You can set an IP yourself and connect to it, or reset the device and make sure you change it's static IP before you save.