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)
相关推荐
bitbrowser32 分钟前
Facebook 验证反复回到原页面,应该从哪里排查
运维·服务器·facebook
Land032943 分钟前
AI网页元素变化无法自动修复?自带元素自愈的自动化解决方案
运维·人工智能·ai·自动化·rpa
fengyehongWorld1 小时前
Jenkins 安装与简单配置
运维·jenkins
云智慧AIOps社区1 小时前
2026 国产化 ITSM 替代指南:横向测评 ServiceNow、轻帆云、Jira等五款主流IT服务管理平台
运维·人工智能·运维开发·it服务管理·itsm平台
虹科网络安全1 小时前
艾体宝新闻|从 SQL 注入到服务器接管:CVE-2026-57517 暴露 Web 管理面板的供应链与安全编码风险
服务器·前端·sql
Urbano1 小时前
针织卫衣全流程生产工序科普:自动化替代、产能优化与设备选型实战方案
运维·自动化
AC赳赳老秦2 小时前
招投标公开数据自动化采集实战:基于 OpenClaw 的定时抓取与业务关键词精准推送
运维·服务器·数据库·自动化·测试用例·deepseek·openclaw
小的博客2 小时前
windows下安装Docker Desptop
运维·docker·容器
酷可达拉斯2 小时前
Linux操作系统-shell编程(0)
linux·运维·服务器·python·云计算
2301_777998342 小时前
Linux中断机制:操作系统如何高效运行
linux·运维·服务器