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)
相关推荐
kebeiovo38 分钟前
atomic原子操作实现无锁队列
服务器·c++
赛博云推-Twitter热门霸屏工具1 小时前
Twitter运营完整流程:从0到引流获客全流程拆解(2026)
运维·安全·自动化·媒体·twitter
CHHC18801 小时前
NetCore树莓派桌面应用程序
linux·运维·服务器
帮我吧智能服务平台2 小时前
装备制造智能制造升级:远程运维与智能服务如何保障产线OEE
运维·服务器·制造
w6100104662 小时前
cka-2026-cri-dockerd
运维·k8s·cka
卤炖阑尾炎3 小时前
PostgreSQL 日常运维全指南:从基础操作到备份恢复
运维·数据库·postgresql
handsomestWei3 小时前
Docker引擎API接入配置
运维·http·docker·容器·api
Tingjct4 小时前
Linux常用指令
linux·运维·服务器
daad7774 小时前
wifi_note
运维·服务器·数据库
IT界的老黄牛4 小时前
Linux 压缩命令实战:tar、gzip、bzip2、xz、zstd 怎么选?一篇讲清楚
linux·运维·服务器