How To Fix: SCP And SSH Login Prompt Is Very Sl...

For my case, the GSSAPI authentication feature was causing the delayed SSH login prompt!

You can confirm the causes of your case by using the -v option switch. For example, the following is the verbose response of SSH login process started with -v option:
dev01 [/home/devstl]$ ssh -v [email protected]
......
......
......
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: Next authentication method: publickey
debug1: Trying private key: /home/devstl/.ssh/identity
debug1: Trying private key: /home/devstl/.ssh/id_rsa
debug1: Trying private key: /home/devstl/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password:

How to fix SCP and SSH delayed login prompt?

The answer for my case is apparently by disabling GSSAPI authentication, which can be done in one of these three ways:
The “fix” is tested with SSH clients installed by  openssh-clients-3.9p1-8.RHEL4.15 RPM file.

1) Specify the option to disable GSSAPI authentication when using SSH or SCP command, e.g.:
ssh -o GSSAPIAuthentication=no [email protected]

2) Explicitly disable GSSAPI authentication in SSH client program configuration file, i.e. edit the  /etc/ssh/ssh_config  and add in this configuration (if it’s not already in the config file):
GSSAPIAuthentication no

3) Create a file called  config  in .ssh directory of respective user home directory (or whichever user home directory that need to get rid of this show login prompt). For example, edit  /home/devstl/.ssh/config  (create the config file if it’s not currently exist) and add in the  GSSAPIAuthentication no  option.
1)  /etc/ssh/ssh_config is a global SSH client configuration file that affects all system users who are using SSH client programs.

2)  /home/devstl/.ssh/config is local SSH client configuration file that only affects the user account called devstl. Whatever SSH client options specified in this local file overwrite the options stated in global SSH client configuration file.

After disabling GSSAPI authentication, SSH login prompt is back to “normal” now:
dev01 [/home/devstl]$ ssh -v [email protected]
......
......
......
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/devstl/.ssh/identity
debug1: Trying private key: /home/devstl/.ssh/id_rsa
debug1: Trying private key: /home/devstl/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password:

As you can see, the SSH login is not currently authenticated via public key cryptography method, which I’ve to fix it later :-(

你可能感兴趣的:(How To Fix: SCP And SSH Login Prompt Is Very Sl...)