· 打开Mac终端,切换到root权限下
1、切换root权限: sudo -i
sudo -i
2、通过ssh命令连接linux服务器
ssh root@127.0.0.1
ssh root@127.0.0.1
root是账户名,@后面的是连接的ip地址。然后根据提示输入密码即可成功。
期间可能遇到的问题提示:
(1)期间可能会提示一些验证失败信息,选择yes即可:
The authenticity of host ‘127.0.0.1 (127.0.0.1)’ can’t be established.
ECDSA key fingerprint is x x x x x.
Are you sure you want to continue connecting (yes/no)? yes
(2)这一步输入密码时,终端没有反应,正常输入即可(我输了两次才对)
Warning: Permanently added ‘127.0.0.1’ (ECDSA) to the list of known hosts.
root@127.0.0.1’s password:
Permission denied, please try again.
root@172.16.2.231’s password:
Last failed login: Wed Jun 10 11:19:07 CST 2020 from 10.1.6.19 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Tue Jun 9 09:47:02 2020 from 10.1.6.21
[root@t1-ptz-01 ~]# ls
anaconda-ks.cfg Centos-7.repo
(3)连接成功后,切换到home目录,就看着眼熟了,可以使用了。
[root@t1-ptz-01 ~]# cd /home
[root@t1-ptz-01 home]# ls
coreapp zabbix