I use RedHat machine. /etc/resolve.conf was set to nameserver and it works well.

I'm wondering how to connect my machine if it's disconnected from internet? It seems that if DNS of is not available, I can't login. Am I right? How to set it up if I want to login anyway?

This redHat is a virtual machine, resides on my laptop. I want to be able to login even-though the laptop is not connected to internet. Thank you!

  • Firstly this should have gone to superuser.com not us (read our FAQ) and secondly how is your login process reliant on full web dns access? Either you have some form of LDAP setup that needs external access (in which case it won't work disconnected) or it doesn't.
    – Chopper3
    Aug 7, 2012 at 14:19
  • It doesn't login at all, or it take an excessive amount of time?
    – Chris S
    Aug 7, 2012 at 14:42
  • You are probably not right. What is "can`t login"? What is the error message? What happens, what does not happen, how do you log in?
    – Nils
    Aug 7, 2012 at 20:11
  • Do you mean login in a console or via ssh, or both?
    – jachguate
    Aug 8, 2012 at 6:17

1 Answer 1


If you are logging in using ssh, when you try to connect it will perform a reverse DNS lookup on your IP. This is for security (supposedly), as often Hax0rs will use a spoof DNS record when trying to connect to random ssh services. In centos this doesn't actually stop you connecting, but it does delay the login process by about 40 seconds.

In my experience with CentOS, if this check fails it will not prevent login, however it will create a log entry saying there is a possible hacking attempt. If you are using a script with expect, it may fail unless you declare a wait time.

To get around this you can add UseDNS no to /etc/ssh/sshd.conf and reload your sshd service. This should stop reverse lookups.

You must log in to answer this question.