cursor通过ssh连接远程服务器

Windows下在c:\Users\用户\.ssh\config文件中添加如下内容:

shell 复制代码
Host remote
    HostName 192.168.6.218
    User root
    Port 22
    IdentityFile C:\Users\用户名\.ssh\id_ed25519

设置免密登录,在Windows下运行如下命令:

shell 复制代码
ssh-keygen -t ed25519 -C "cursor"

生成私钥和公钥,然后把公钥id_ed25519.pub拷贝到远程的主机上192.168.6.218,然后执行

shell 复制代码
[root@localhost ~]# cat id_ed25519.pub >> ~/.ssh/authorized_keys
[root@localhost ~]# chmod 600 ~/.ssh/authorized_keys
[root@localhost ~]# chmod 700 ~/.ssh

接下来在Windows下通过ssh远程连接主机192.168.6.218,这个时候需要输入一次密码,后面不需要再输入,接下来需要配置sshd_config

shell 复制代码
[root@localhost archery]# vi /etc/ssh/sshd_config 
#以下是增加的内容
AllowTcpForwarding yes
AllowAgentForwarding yes
[root@localhost archery]# systemctl restart sshd

否者会报错

shell 复制代码
无法连接到远程扩展主机服务器 (错误: WebSocket close with status code 1006)
相关推荐
Pniubi5 小时前
基于openclaw开发skill与自研agent中的skill开发区别
服务器·agent·skill·openclaw·龙虾
jaronho5 小时前
【脚本】 【Linux】启动所有网卡
linux·运维·服务器
JavaPub-rodert5 小时前
服务器不能访问 Docker Hub,镜像怎么搬过去?讲透 docker save、load、export、import 与离线镜像分发
运维·服务器·docker
EasyGBS14 小时前
摄像头还在线,画面已经不能用了?国标GB28181视频平台EasyGBS视频质量诊断怎么用
服务器·安全·音视频
程序员-Benothing14 小时前
Vim编辑器从入门到精通:模式、快捷键、配置、插件
linux·运维·服务器
m0_6464299714 小时前
Docker 完整核心知识点总结(超通俗易懂版)
运维·docker·容器
wdfk_prog14 小时前
LWIP教程 09:从 `tcp_slowtmr()` 到 Fast Retransmit——TCP 超时重传与重复 ACK
服务器·网络·数据库·网络协议·tcp/ip
‎ദ്ദിᵔ.˛.ᵔ₎14 小时前
linux 进程信号 (上)
linux·服务器
亚川楼宇自控系统数据中心厂家14 小时前
IBMS 集成管理系统:如何打通楼宇自控实现建筑一体化管控
运维