Problem
I have some HP-UX servers, one day I have configured the resolve.conf on one server to resolve the www.onlinesbi.com and www.sbiepay.com domains through my DNS server. After configuring the resolv.conf on this server I tried to access the server through PuTTY using SSH protocol but it takes too much time to appear the login prompt.
Reason
SSH was taking too much time because it was using the DNS server for SSH connectivity although it was disabled in the configuration file /opt/ssh/etc/sshd_config.
Solution
- Log in as a super/root user on the server.
- Edit the configuration file /opt/ssh/etc/sshd_config as shown below:
# vi /opt/ssh/etc/sshd_config
. . . #AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes #PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes #UseLogin no #EnforceSecureTTY no #UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #UseDNS yes #PidFile /var/run/sshd.pid #MaxStartups 10 #PermitTunnel no #ChrootDirectory none . .
- Change the #UseLogin no to UseDNS no and save the file.
. . . #AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes #PrintMotd yes #PrintLastLog yes #TCPKeepAlive yes #UseLogin no #EnforceSecureTTY no #UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 UseDNS no #PidFile /var/run/sshd.pid #MaxStartups 10 #PermitTunnel no #ChrootDirectory none . .
- These changes will come into effect when the ssh service will be restarted. To restart the ssh service, use the below commands:
# /sbin/init.d/secsh stop HP-UX Secure Shell stopped # /sbin/init.d/secsh start HP-UX Secure Shell started
Now login on to the server through PuTTY and you will be able to log in successfully without any delay.
Note: I faced this issue on an HP-UX 11.31 server.
Last Updated: June 10, 2019
Related Posts
- How to Find NIC (Network Interface Card) Details in HP-UX
- How to Install a .depot Package Using swinstall on HP-UX
- HP-UX: How to restrict NFS share access to a particular server?
- crontab: you are not authorized to use cron. Sorry. in HP-UX
- HP-UX: SSH taking too much time after adding the DNS Servers
- How to add DNS servers on an HP-UX server
- How to login to vPar console in HP-UX
- How to extend the size of Logical Volume (LV) in HP-UX
- How to determine file system type in HP-UX using command
- How to check vPar machines status in HP-UX
- How to find HBA cards/ports and WWN Number details in HP-UX (nPar)
- How to find HBA cards/ports and WWN Number details in HP-UX (vPar)
- HP-UX command to get Physical Memory Information
- HP-UX command to get Processor Information
- HP-UX command to get Hardware Serial Number
- su: Sorry in HP-UX while switching from normal user to root user
- SSH login taking too much time on HP-UX 11.31
- How to Disable Root SHH Login in HP-UX?
- hpvmstatus: HPVM currently not running.
- How to view/print routing table in HP-UX?
- Create a Logical Volume larger than 2TB and format it in HP-UX
- Protect SSH Logins with SSH and MOTD Banner Messages in HP-UX
- Remove welcome message after login in HP-UX 11.31
- Create a Logical Volume and format it in HP-UX
- How to rescan new LUNs added in HP-UX 11.31
- How to reboot a HP-UX machine?
- How to remove File System, LV and VG in HP-UX and Linux?
- How to remove NO_HW devices from ioscan in HP-UX without a reboot?
- Change root user password of vpar machine in HP-UX