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)
相关推荐
秋刀鱼 ..2 小时前
第二届光电科学与智能传感国际学术会议(ICOIS 2026)
运维·人工智能·科技·机器学习·制造
蓝天~白云2 小时前
ESXI虚拟机启动卡住在0%,无法关闭
linux·运维·服务器
明月心9522 小时前
IP 中 0/24 和 0/16 的区别
linux·服务器·网络·ip
赵庆明老师2 小时前
NET 使用SmtpClient 发送邮件
java·服务器·前端
java_logo2 小时前
Onlyoffice Documentserver Docker 容器化部署指南
运维·人工智能·docker·容器·onlyoffice·milvus·documentserver
model20053 小时前
Alibaba linux 3安装LAMP(6)
linux·运维·服务器
MUTA️3 小时前
使用ImageZMQ将本地摄像头画面传输到服务器
运维·服务器
wjykp3 小时前
1.vmware虚拟机安装和配置os
linux·运维·服务器
Henry Zhu1233 小时前
VPP中的DPDK插件源码详解第一篇:DPDK插件的作用和意义以及整体架构
运维·服务器·网络·计算机网络·云原生