ssh几行命令上Centos服务器更新系统

如果电脑上没有安装Putty之类的工具,如何用ssh来管理Linux服务器?
首选,打开电脑的命令行工具,windows系统下运行框输入cmd,mac系统下进入Terminal。
先确认一下是系统中否存在ssh,输入ssh -V

# 确认有ssh工具
C:\Users\KIng>ssh -V
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

接下来,我们连接服务器,输入ssh root@161.117.xxx.xxx

# 初次连接,会提示是否确认连接,输入yes
C:\Users\KIng>ssh root@161.117.xxx.xxx
The authenticity of host '161.117.xxx.xxx (161.117.xxx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:+kL8FkiqhldNYuUKBhyniBxCfY70jUvq7z0xGeieTxg.
Are you sure you want to continue connecting (yes/no)?

# 紧接着,会提示输密码
root@161.117.xxx.xxx's password:

登入成功后,就和我们之前熟悉的ssh界面一样了。

# 更新系统吧
yum -y update

转载请注明出处:https://www.onexin.net/ssh-cmd-centos/

相关文章:

1、CentOS 7.x系统下安装Cisco AnyConnect服务器端
https://www.onexin.net/centos-7-x-cisco-anyconnect/

2、CentOS 7.8 系统yum环境搭建PHP 7.4.x + Apache 2.4 + MariaDB 10.x
https://www.onexin.net/centos-7-x-php-7-x-apache-2-4-mariadb-10-x/

3、CentOS 8.2 服务器上yum安装Apache+Php+MariaDB+MongoDB
https://www.onexin.net/centos-8-2-yum-apache-php-mariadb-mongodb/

4、Centos 6.0 下LAMP环境搭建从入门到精通(yum命令)
https://www.onexin.net/centos-6-0-under-the-lamp-environment-to-build-from-the-entry-to-the-master-yum-command/

5、Centos 6.0 下LAMP环境搭建从入门到精通(序言)
https://www.onexin.net/centos-6-0-under-the-lamp-environment-to-build-from-the-entry-to-the-master-preamble/

Leave a Reply