Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux SSH remote connection service slow Solutions     - Linux network security backdoor technology and advanced skill practice (Linux)

- Linux server operating system security configuration (Linux)

- System Safety: Windows and Linux platforms (Linux)

- Why I do not like the Go language style interface (ie Structural Typing) (Programming)

- The need to avoid a gap of InnoDB lock (Database)

- php for Linux the MySQL extension module installation and configuration (Database)

- Java 8 perspective annotation types (Programming)

- Linux System Getting Started Learning: From VirtualBox from the client host access NAT (Linux)

- Java Set and List in the relationship and difference (Programming)

- Linux find command usage practices (Linux)

- Analysis of memory mapping process in Linux x86-32 mode (Linux)

- Oracle RMAN-06023 and ORA-19693 errors (Database)

- Systemd on RHEL7 (Linux)

- iptables using summary (Linux)

- Programmer editor Vim (Linux)

- Oracle 12CIN-memory in table spaces (Database)

- How to customize your Linux desktop: Gnome 3 (Linux)

- Installation in lxml Python module (Linux)

- How to Debian Linux the default Python version switch to alternative version (Linux)

- Oracle 11g RMAN cross-platform transfer table space (Database)

 
         
  Linux SSH remote connection service slow Solutions
     
  Add Date : 2018-11-21      
         
         
         
  Under Linux SSH remote connection service slow Solutions

1, for command and program are as follows:
[Remote connection and Run]
ssh -p22 root@192.168.1.253
ssh -p22 root@192.168.1.253 / sbin / ifconfig
[Remote Copy: Push and pull]
scp -P22 -r -p / etc root@192.168.1.253: / tmp /
scp -P22 -r -p root@192.168.1.253: / tmp / / etc
[Secure FTP function]
sftp -oPort = 22 root@192.168.1.253
[] No password authentication scheme
For example, using sshkey bulk distribution of documents, perform deployment operations.

2, the main reason for the connection is slow DNS resolution result
Solution:
The most common reason is because the server's sshd will go to visit client IP DNS lookup of hostname, if DNS is not available or no relevant records, will spend a lot of time.
1, in the server / etc / hosts file to your local machine's IP and hostname added
2, change the / etc / ssh / sshd_config file to configure the following on the ssh server:

UseDNS no
# GSSAPI options
GSSAPIAuthentication no

    GSSAPIAuthentication parameter for Kerberos authentication, and for most people, it is impossible to use this authentication mechanism, so pay attention to them stopped.
    Then, perform /etc/init.d/sshd restart restart sshd configuration to take effect the above-mentioned process, the connection is not generally slow.

3, if it is slow, checking on ssh server / etc / hosts file, 127.0.0.1 and the corresponding host name
uname -n The same results, or to the local ip and hostname (uname -n result) was added to the / etc / hosts Lane.

3, using ssh-v debugging function to find the reasons for slow
In fact, you can use the following command to debug a slow Why the details (learn this idea is very important).
[Root @ localhost ~] # ssh -v root@192.168.2.15
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data / etc / ssh / ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.2.15 [192.168.2.15] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4 *
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-> client aes128-ctr hmac-md5 none
debug1: kex: client-> server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST (1024 <1024 <8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host '192.168.2.15 (192.168.2.15)' can not be established.
RSA key fingerprint is ca: 18: 42: 76: 0e: 5a: 1c: 7d: ef: fc: 24: 75: 80: 11: ad: f9.
Are you sure you want to continue connecting (yes / no)? Yes
=======> This is prompted to save the key interactive prompt.
Warning: Permanently added '192.168.2.15' (RSA) to the list of known hosts.
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey, password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
root@192.168.2.15's password:
=======> This is prompted interactively prompted for a password.
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Last login: Tue Sep 24 10:30:02 2013 from 192.168.2.13
  
When a slow remote connection if you can determine where the cards.
[Root @ localhost ~] # ssh -v oldboy@192.168.2.18
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data / etc / ssh / ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.2.18 [192.168.2.18] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH *
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server-> client aes128-ctr hmac-md5 none
debug1: kex: client-> server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST (1024 <1024 <8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.2.18' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey, gssapi-keyex, gssapi-with-mic, password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic

With the above arrangement is not found to gssapi this card. They probably know gssapi problem. In fact, part of the Linux system optimization should be optimized SSH service here.
     
         
         
         
  More:      
 
- LAMP environment to build Apache, MySQL, PHP under Ubuntu (Server)
- shell script: MySQL monitoring service is normal (Database)
- Installation on Ubuntu class Winamp audio player Qmmp 0.9.0 (Linux)
- Asynchronous JavaScript loading (Programming)
- Zabbix monitoring platform to extract a single server graphical Python implementation of concurrent (Server)
- Spring MVC Exception Handling (Programming)
- Qt signals and slots mechanism (Programming)
- The best known for archiving / compression tool under linux (Linux)
- Port is not being used, how will bind failure? (Server)
- OpenGL shadow map (Programming)
- DRBD installation configuration, working principle and Recovery (Server)
- Virtual Judge structures under Ubuntu 14.04 (Server)
- How to implement Linux host Telnet SSH password Free (Server)
- Ubuntu 14.04 LTS 64-bit install GNS3 1.3.7 (Linux)
- To deploy MySQL database with separate read and write OneProxy (Database)
- Oracle GoldenGate tutorial Second, configure and use (Database)
- Grub2: Save Your bootloader (Linux)
- SUSE Firewall Configuration (Linux)
- Practical Handbook: 130+ improve the efficiency of commonly used commands Vim (Linux)
- Linux directory permissions to read and execute permissions difference (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.