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)
相关推荐
骇客野人5 小时前
Redis 完整安装部署方案(Linux,分【源码编译】+【Docker】两种,推荐生产用源码,测试快速用 Docker)
运维
比兔代理7 小时前
正向代理与反向代理技术辨析,为什么代理 IP 属于正向代理
服务器·网络·http·ip
Wang's Blog8 小时前
Java 接入Redis: 通用命令与键管理
java·服务器·redis
Wang's Blog8 小时前
Java 接入Redis: 列表集合与有序集合操作命令
java·服务器·redis
蓝速科技9 小时前
会议室门牌公告通知发布选型与落地指南丨蓝速科技
大数据·运维·数据库·人工智能·科技
Ivanqhz9 小时前
SVD++算法
java·服务器·网络·深度学习·神经网络
chicheese9 小时前
Linux 面试速查表:从初级到高级,附高频场景答题模板
linux·运维
Linux-lucky10 小时前
32-38-Linux学习之旅之MySQL综合
linux·运维·学习·mysql·ubuntu
智能运维指南10 小时前
2026年ITSM系统怎么选?四款主流方案与五维评估模型
运维·itsm·嘉为蓝鲸
我命由我1234510 小时前
Git 推送报错:error: src refspec main does not match any
运维·git·gitee·github·运维开发·学习方法·版本控制