1、实验环境
①localhost.localdomain
172.25.254.10
②node.westos.com
172.25.254.20
基本命令:
- ifconfig 查看ip地址
- nm-connection-editor 设定ip地址
- hostnamectl set-hostname 设定主机名称
2、Openssh服务的基本信息
1.Openssh的作用:
在企业中的运维工作,不是1v1的运维
运维工程师基本都是1vN
在运维工程师对服务器进行管理时
需要通过网络登陆远程主机
需要通过网络在远程主机中开启shell来进程操作
远程主机必须提供这样的开启shell的方式
以上的需求由openssh服务来提供
远程主机中安装了openssh并开启了这个程序
那么我们就可以通过网络来连接这台主机了
2.软件包名称
openssh-server
3.服务名称
sshd
4.客户端
ssh
-
ssh 172.25.254.20 -l root
172.25.254.20 为远程主机的ip -
-l login 登陆
root: 远程主机的超级用户
[root@localhostt ~]# ssh 172.25.254.20 -l root
The authenticity of host '172.25.254.20 (172.25.254.20)' can't be established.
ECDSA key fingerprint is SHA256:+5Ikt8ZExrRdLzOg19xsL5PhAYPt8GB7umvLcSF/dlM.
Are you sure you want to continue connecting(yes/no)? yes#建立关系
Warning: Permanently added '172.25.254.20' (ECDSA) to the== list of known hosts.
root@172.25.254.20's password: #输入远程主机密码
Activate the web console with: systemctl enable--now cockpit.socket
Last login: Sat Apr 25 09:02:58 2020
[root@node ~]# #登陆成功
如图所示:因为我之前登陆过,所以直接登录成功