In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail about how ssh can not connect to remote Ubuntu, Xiaobian feels quite practical, so share it with you as a reference, I hope you can gain something after reading this article.
I. Preparation for remote login virtual machine:
Ubuntu virtual machine networking mode should choose Bridged (bridge mode), you can configure static IP in Ubuntu, or use a router (own use is WiFi connection, through the wireless router configuration) through the DCHP server for IP address allocation (general configuration does not change, through MAC address identification to allocate addresses, unless the IP address has been exhausted). For VMWare networking methods, please refer to: vmware bridge, nat, host-only difference
For configuring the network card, you can configure it in Edit->Virtual Network Editor of VMWare.
p.s. On Ubuntu systems, you can use the commands #ifup {interface} and #ifdown {interface} to turn on and off the relevant network card. However, if you set it with ifconfig eth0 or modify the network interface, you can no longer close it with ifdown eth0. Because ifdown will analyze and compare the current network parameters with ifcfg-eth0 to see if they match, if they do not match, the operation will be abandoned. Therefore, after modifying with ifconfig, you should be able to close the interface with ifconfig eth0 down.
Second, some configurations on the remote host (Ubuntu):
Openssh-server software must be installed so that you can connect to the Ubuntu virtual machine via ssh.
Installation command: sudo apt-get install opensh-server.
sudo /etc/init.d/ssh restart
For details, please refer to: Install OpenSSH Server under Ubuntu and connect Ubuntu remotely on the client.
Now, with opensh-server installed, you can run the command: netstat -an| grep 22 or ps -e| grep ssh
Check to see if port 22 is LISTEN or the ssh service is running, if so, ssh is configured on the Ubuntu host.
XShell connects to remote host Ubuntu:
Follow the prompts and configure step by step. Select port number 22. After personalized configuration, you can log in remotely.
p.s.
1. In order to display Chinese properly in xshell, we need to change the xshell encoding mode to utf8. Specific operations are:
[file]->[open]-> Select the connection in the open session, click [properties] -> [Terminal ], select utf8 in the translation on the right, and then reconnect to the server.
2. How to transfer files on Windows OS to Linux on virtual machine
Law 1:
Enter rz -help
If it appears that the program "rz" has not been installed. You can install it using the following command:
sudo apt-get install lrzsz
Switch to the directory where you want to store your files
File->Transfer->Send ZMODEM, a dialog box appears, select the file you want to transfer.
Law 2:
Use pscp (a binder for putty) to transfer files.
In addition, I would like to talk about some of the benefits of adopting the remote login method:
1. The terminal can be personalized;
2. Virtual machines do not have to run on graphical interfaces;
3, simple operation, as in the system terminal operation;
4, transfer files is very simple, in addition, you can use paste copy, which is very convenient.
Attached:
Fire this command:
sudo iptables -L
If you see that no traffic is allowed (i.e. no specific rules), then run the following command:
sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
this command tells the system to allow incoming connections to port 22... and usually should solve your dilemma, specifically for ssh / sshd.
UPDATED as of July 31,2016: iptables have nothing to do with ssh as an application, but on other hand, functions as router in allow the traffic to port 22. When using iptables, the system actually understand 'ssh' however, it's a shortcut within command line but, really, it's actually iptables INPUT -p udp -dport 22 while --dport means "destination port">
About "ssh can not connect to the remote Ubuntu how to do" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.