第一部分 IP查看
1.下载net-tools,ifconfig命令工具包
sudo apt-get install net-tools
2.输入命令:ifconfig ,inet 之后为IP信息
hadoop@ubuntu:~$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.36.128 netmask 255.255.255.0 broadcast 192.168.36.255
inet6 fe80::e22f:9703:8997:8011 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:dc:b9:62 txqueuelen 1000 (Ethernet)
RX packets 21404 bytes 26940446 (26.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8361 bytes 793052 (793.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 425 bytes 35039 (35.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 425 bytes 35039 (35.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
第二部分 xshell连接ubuntu
步骤:a.安装SSH,b.安装xshell,c.xshell连接ubuntu
1.安装SSH
xshell远程连接ubuntu是通过ssh协议,需要给ubuntu安装ssh服务:
ubuntu执行命令:sudo apt-get install openssh-server
hadoop@ubuntu:~$ sudo apt-get install openssh-server
[sudo] password for hadoop:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ncurses-term openssh-client openssh-sftp-server ssh-import-id
Suggested packages:
keychain libpam-ssh monkeysphere ssh-askpass molly-guard rssh
The following NEW packages will be installed:
ncurses-term openssh-server openssh-sftp-server ssh-import-id
The following packages will be upgraded:
openssh-client
SSH服务重启命令:sudo service ssh restart
PS:ssh远程连接时通过网络连接,如果连接不上可检查网络,ping下IP是否通,重启服务;
2.安装xshell
a.windows宿主机下载xshell安装包,安装xshell程序;
xshell安装包百度云地址:https://pan.baidu.com/s/1eHTp6uLaTapNELlF2_g_rg
提取码:52dz
b.安装成功后,启动xshell:新建》输入IP信息》点击确定》点击连接,选择协议:ssh
输入用户账号和密码
连接成功: