mac 上 ssh: connect to host localhost port 22: Connection refused

1。 问题

在搭建hadoop环境的时候 发现ssh localhost 在报错

2. 解决

打开系统设置 -> 共享 -> -> 在左边服务中选择 远程登录

注意红框这些选项慎重选择!!!

修改后,在终端再次 ssh localhost 发现登录成功了

如果之前没有使用ssh 登录过得话 还会提示让你把localhost 加入到已知的hosts中 我们选择yes即可。

good day !!!

相关推荐
pe7er3 天前
macOS 应用无法打开(权限问题)解决方案
macos·mac
埃博拉酱4 天前
VS Code Remote SSH 连接 Windows 服务器卡在"下载 VS Code 服务器":prcdn DNS 解析失败的诊断与 BITS 断点续传
windows·ssh·visual studio code
zhangfeng11335 天前
趋动云 如何ssh登录 服务区 项目server
运维·人工智能·ssh
harmful_sheep5 天前
mac生效的终端查看
macos
txzz88885 天前
CentOS-Stream-10 Secure Shell服务器
linux·centos·ssh·secure shell·ssh服务器
iOS门童6 天前
macOS 应用"已损坏"无法打开?一文搞懂 Gatekeeper 与解决方案
macos
NPE~6 天前
[工具分享]Maccy —— 优雅的 macOS 剪贴板历史管理工具
macos·教程·工具·实用工具
文静小土豆6 天前
CentOS 7 OpenSSH 10.2p1 升级全攻略(含离线安装与回退方案)
linux·运维·centos·ssh
差不多程序员6 天前
Mac安装OpenClaw-cn保姆级教程
macos
dzl843946 天前
mac 安装python
开发语言·python·macos