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.
When I ssh into my new Debian box there is a wait of some 15 seconds before the password prompt comes up.
This is a minor irritation, but is a bit annoying, because quite often I go to some other task and when I come back the ssh session has reset and I have to start over.
I read somewhere that it's caused by DNS issues and I should edit my /etc/hosts file but my router is allocating DHCP.
Can anyone suggest a fix?
Also my ftp is slow, and I'm thinking it's the same underlying cause.
When I ssh into my new Debian box there is a wait of some 15 seconds before the password prompt comes up.
This is a minor irritation, but is a bit annoying, because quite often I go to some other task and when I come back the ssh session has reset and I have to start over.
I read somewhere that it's caused by DNS issues and I should edit my /etc/hosts file but my router is allocating DHCP.
Can anyone suggest a fix?
Also my ftp is slow, and I'm thinking it's the same underlying cause.
well as you said, it's very likely to be a DNS issue. on the destination server run "host ip.of.cli.ent" and that's what sshd is also doing when you connect. you can turn off dns resolution in your /etc/ssh/sshd_config or make it resolve to a valid host name however you see fit.
Well it probably will, if there's not a compelling reason to provide a different IP, you can usually rely on the same one. Or maybe you can reserve one on the the DHCP server?
This is a minor irritation, but is a bit annoying, because quite often I go to some other task and when I come back the ssh session has reset and I have to start over.
Are you familiar with autossh?
Sounds like you solved your login delay problem, but this can save you from having to start over.
If you're going between proper Linux systems, why bother? What would this give you other than preshared keys and a while [ 1 ] loop??
It would give you a perpetual ssh session that does not require user intervention. autossh monitors the connection and automatically reconnect if the remote sshd or local ssh client die for any reason.
I thought this was exactly what you asked for originally.
When I ssh into my new Debian box there is a wait of some 15 seconds before the password prompt comes up.
This is a minor irritation, but is a bit annoying, because quite often I go to some other task and when I come back the ssh session has reset and I have to start over.
Original question (above) has to do with having to enter a password to reconnect via ssh, no? OP does not explain why the ssh is "reset" and that would require a different approach to correct, but, regardless, whatever the reason ssh dies, autossh will reestablish the connection automatically w/o the need to login again.
It "fixes" the original issue.
No, the issue is the delay. that's the point. nothing about passwords, nothing about losing connection even really. whether the delay is followed by a password or a direct login, the delay is still going to be there. autossh doesn't fix the issue it hacks around it.
Truth be told, I've had to deal with this in the past, too. I just wrote it off as that I had a poor (thin pipe) Internet connection and the problem went away when I moved to a better network.
Is UseDNS No helping you out, cov? I've not tried it ever.
I guess we beat this password vs reconnect thing to death, acid_kewpie?
Two problems, I suppose -- (1) annoying delay for password prompt and (2) having to login again after ssh connection dies (irritating in itself but specially so because of the long password delay).
cov seems to be happy with a solution for problem (1) -- see post #4.
My suggestion deals with problem (2).
So in the end, no delays to login, no need to reconnect and everybody is happy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.