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

1。 问题

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

2. 解决

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

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

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

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

good day !!!

相关推荐
sysinside2 天前
macOS Tahoe 26.4.1 (25E253) 正式版 ISO、IPSW、PKG 下载
macos·tahoe
遥不可及zzz2 天前
[特殊字符] Android AAB 一键安装工具配置指南
android·macos
芜湖xin2 天前
【恒源智享云】pycharm社区版SSH方式使用实例
ssh·云服务器
corpse20102 天前
VirtualBox 安装ubuntu-25 ,配置SSH工具登录
linux·ubuntu·ssh
踏着七彩祥云的小丑3 天前
Mac——已安装工具查找
macos
小红的布丁3 天前
公网 IP、私网 IP、路由表、转发表与 MAC 地址的关系
tcp/ip·macos·智能路由器
Lecxcy_Kastreain3 天前
如何自适应 MacOS
macos
Zhu7583 天前
【软件更新】在Ubuntu24 LTS中更新openssl到指定版本,例如openssl3.5.6 LTS
linux·ssh·ssl
有理想的打工人3 天前
gitlab群组管理与ssh链接
ssh·gitlab
简单点了3 天前
mac安装node环境
macos