Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok, checked packet with sniffer on client machine. All packets after successful authentication are dublicates to the ACK or TCP retransmissions.
Now I've tried to SSH to router itself. In this case source address is correct and src/dst addresses are the same as with PuTTY. For some reason, by using Gnome terminal packets are dublicates and retransmits. I'm totally lost.
And also, tell please what is your network configuration: IP for wireless, IP for LAN, network masks, what is network configuration on client, their IP, network masks and GW. Do they all use the same GW.
EDIT: Ah, I see you've made progress since your last post on src address, but I'll leave this post here just in case it's of any use.
I don't know, but I would say it's almost definitely your problem. The packet's src address should be the address of the source (the sshd server) not the address of the router!
Imagine this scenario.
What if you ssh'd from machine A to machine E and your route took you through several routers? It would be insane if each router replaced the src address so that it was no longer the address of machine E, wouldn't it?
I'm not sure why this is happening to you, nor how to fix it, but someone somewhere must have encountered it and know how to fix it. (I think some my router does something similar with OpenVPN packets, but that's a bit different I think.)
All the best!
P.S. You definitely don't have anything like IPtables running on your router?
Thanks for helping me out. Of course it is my problem and it is obvious. I think all WiFi and SSH related bugs are corrected by this time. Ok, here it goes debug output from ssh -v
Code:
OpenSSH_5.1p1 Debian-6ubuntu2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.5.6 [192.168.5.6] port 22.
debug1: Connection established.
debug1: identity file /home/xxx/.ssh/identity type -1
debug1: identity file /home/xxx/.ssh/id_rsa type -1
debug1: identity file /home/xxx/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5ubuntu1
debug1: match: OpenSSH_5.1p1 Debian-5ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-6ubuntu2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.5.6' is known and matches the RSA host key.
debug1: Found key in /home/xxx/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/xxx/.ssh/identity
debug1: Trying private key: /home/xxx/.ssh/id_rsa
debug1: Trying private key: /home/xxx/.ssh/id_dsa
debug1: Next authentication method: password
username@192.168.5.6's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Now network configuration:
LAN
---
Network: 192.168.5.0/24
Gateway: 192.168.5.254
LAN sends to 192.168.5.254, but wireless to 172.16.5.254.
Does 192.168.5.254 and 172.16.5.254 have connection between each other?
Or it is just a mistake?
192.168.5.254 and 172.16.5.254 is joined by routing tables and is accessible. it is simply two interfaces of the router. Anyway I was wrong about saying that return packets has different source address. Now I have double checked packets through router and here they are:
Code:
Interface Direction Src. address Dst. address
------------------------------------------------------------
wlan1 in 172.16.5.109:60042 192.168.5.6:22
ether2 out 192.168.5.254:60042 192.168.5.6:22
ether2 in 192.168.5.6:22 192.168.5.254:60042
wlan1 out 192.168.5.6:22 172.16.5.109:60042
So it means that SSH client "talks" directly to server and SSH server talks with its gateway, but anyway it is correct. So no I begin to think that this is WiFi and SSH issue mentioned in one of the bug lists rather than router problem. The same path of packets I have by using PuTTY, but it works like a charm. So now I want to shoot myself
Yes, but here we talk about router. It has route tables and SRC NAT facility, so it is possible in my case. Look above where I posted about how packets go from one network to other through router.
Yes, but question is not "route tables and SRC NAT facility", question is CONFIGURATION.
You route has to have proper configuration to accept SSH traffic from both networks and send it to both directions.
And it seems to me that your route can't do all of it.
Everything is not so complex as it seems. Here is the facts:
1. I can SSH to server and successfully login. If packet route would be wrong I would never authenticate
2. Everything works perfectly with the same conditions, but with PuTTY. This again means that routing of packets is ok.
The last 4 or 5 packets where sent after successful login and gnome was hung. If I do not close gnome terminal then it keeps sending the same packets.
Also I've checked about Broadcom WiFi and SSH bug mentioned in some link and made 'blacklist wl', but it didn;t worked. Everything works the same.
Look, your server changed a port.
You start session from 57353, but later server send packet to 57299 (192.168.5.6.22 > 172.16.5.109.57299)
I do not think that it is good, that is probably why Gnome terminal hangs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.