Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Rep:
DNS server down, can't SSH to anything
My main server (which also does DNS) is "down" (network wise) thus DNS currently does not work on my network. I need to SSH into my switch to make some changes which are required to get the server back up. Problem is I cannot SSH into anything even by IP because from what I'm reading SSH does reverse lookups.
Is there a way around this? Worse case scenario I can maybe console into the switch.
Problem is I cannot SSH into anything even by IP because from what I'm reading SSH does reverse lookups.
If that is true, then how come I can ssh between all my home computers on my LAN (192.168.0.xxx)? I have no DNS nor /etc/hosts set up for my home computers. I ssh via IP address only. Using OpenSSH.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
I want my main Linux server (which does DNS and lot of other functions) to be vlan aware so I can put VMs on different vlans, so I configured the vlan interfaces. I disabled the eth0 "main" interface and lost connectivity. vlan2 is my main vlan but it's set as native on that port. I think all I have to do is go remove it from native and then put it as a normal vlan (have to allow each vlan for the trunk port). however I can't ssh into the switch by IP anymore, nor any other server. I type
ssh 10.1.1.3
It just sits there forever. Googled that, and found lot of stuff related to that being caused by DNS issues. My DNS server is also the server that does reverse lookups. Ex: 10.1.1.3 resolves to the hostname of the switch.
Oddly if I tcpdump I don't see ANY traffic when I type that. So maybe something else is going on. I can ping the host fine or telnet to the SSH port so I know it's not a network issue.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
Adding -v. Nothing shows up on the screen. ex:
Quote:
# ssh -v 10.1.1.3 <cr>
<nothing>
ctrl+c
#
Oddly there is zero traffic passed when this happens, unless tcpdump filters some stuff like DNS, as it does lookups of it's own... or maybe it too was locking up. Lot of stuff seems to go tits up when reverse DNS lookups don't work. I could not even load wireshark, and at some point my GUI locked up. (KDE).
I'll probably just end up getting my laptop and a console cable to fix the switch that way once I get home from work (internet wont work till I fix it), but was hoping this was something easier to solve this ssh issue.
Guess this teaches me a lesson, should have a secondary DNS.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
Sure enough when I fixed the issue on my switch to make the server available to the network again, everything started working. Weird it would do that. I have another issue regarding vlans but I'll make a separate thread.
Out of curiosity though is there anything I could have done at the client end to make it work, such as turn up a temporary DNS server?
As previously stated, it's not a DNS issue, so, no, adding another DNS server would not help.
Your description of your network is unclear, but I suspect the connection issue is due to the subnet that your ssh client is trying to use being currently non-existant.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
Nope was able to ping or telnet into the port so I knew routing was ok. I reproduced the issue by turning off DNS on the server just now, as I was curious. The SSH client must be trying to do something related to DNS such as a reverse lookup, and it causes it to hang. Maybe my environment is triggering a bug or something. Most people don't run their own DNS but just use the ISP one, and most of the people that may run their own DNS they probably don't run reverse zones too. So my environment is probably not what is considered typical. Though if you google "SSH hang DNS" or similar terms there are other people who have the same issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.