(Mac异常) localhost: ssh: connect to host localhost port 22: Connection refused

前言

今天启动Mac上的Spark, 运行start-all.sh. 报出了如下异常类型. 个人猜测是本地端口的问题.

# 测试命令
ssh localhost
//ssh: connect to host localhost port 22: Connection refused

解决措施

  • 配置本地到本地的ssh (不知道是否需要?)
# 生成本地密码
ssh-keygen -t rsa
# 将本地公钥匙写入认证地址
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  • 开启配置
sudo systemsetup -f -setremotelogin on
  • 测试
SeandeMacBook-Pro:~ sean$ ssh localhost
Last login: Thu Jul  2 20:56:49 2020

Reference

[1] 解决mac下 ssh: connect to host localhost port 22: Connection refused

©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页