WIN10 system can use bash instead of CRT to solve the problem of ssh slow connection

Source: Internet
Author: User

1. Add your native IP and hostname to the/etc/hosts file on the server

2, modify or add Usedns=no to the/etc/ssh/sshd_config file on the server (this method has been tried, useful)

3, comment out all the rows in/etc/resolv.conf on the server (about this method: the other server does not modify the configuration file Sshd_config according to Method 2, but resolv.conf is empty on this server, that is, this method is also useful)

4, modify the hosts in/etc/nsswitch.conf on the server to Hosts:files

5, reboot server makes configuration effective


InetAddress ia = Inetaddress.getlocalhost ();

String host = Ia.gethostname ();//Gets the computer host name

String ip= ia.gethostaddress ();//Get Computer IP

SYSTEM.OUT.PRINTLN (Host + "," + IP);

WIN10 system can use bash instead of CRT to solve the problem of ssh slow connection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.