执行 ssh root@47.94.142.215

报错

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

ssh: connect to host xx.xx.xxx.xxx port 22: Connection refused 随笔 第1张

 

首先要开启ssh

系统偏好设置-共享

选上远程登陆

ssh: connect to host xx.xx.xxx.xxx port 22: Connection refused 随笔 第2张

选上远程管理

ssh: connect to host xx.xx.xxx.xxx port 22: Connection refused 随笔 第3张

 

检测openssh-server是否安装成功 ,安装成功的如下

ps -e | grep ssh

ssh: connect to host xx.xx.xxx.xxx port 22: Connection refused 随笔 第4张

 

 

mac本身安装了ssh服务,默认情况下不会开机自启

1.启动sshd服务:
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

2.停止sshd服务:
sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist

检查是否启动ssh,启动了的 如下

sudo launchctl list | grep ssh

ssh: connect to host xx.xx.xxx.xxx port 22: Connection refused 随笔 第5张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄