cursor连接Ubuntu远程

目录

  • [1 生成ssh密钥对](#1 生成ssh密钥对)
  • [2 cursor设置](#2 cursor设置)

1 生成ssh密钥对

在笔记本电脑上执行,

bash 复制代码
# 生成RSA密钥对
ssh-keygen -t rsa -b 4096 -C "your-email@example.com"

# 查看公钥内容
cat ~/.ssh/id_rsa.pub

在ubuntu远程上执行,

bash 复制代码
echo "公钥内容" >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

在笔记本上执行,测试连接,

bash 复制代码
ssh -i ~/.ssh/id_rsa username@hostname

2 cursor设置

按下ctrl + shift + P,输入Remote-SSH: Connect to Host,配置config文件,

bash 复制代码
Host ubuntu4090
    HostName hostname
    User username
    IdentityFile ~/.ssh/id_rsa

即可连接!锁屏也不需要重新输入密码!

相关推荐
飞奔的瓜牛6 小时前
Nginx 生产环境运维实践:常见问题、关注要点与日常维护
运维·nginx
Eyfcom9 小时前
〖物流 SaaS 实战 02〗SaaS 租户的计费与订阅模型:从“一锤子买卖”到“按需订阅”
linux·服务器·数据库·快递系统·物流saas实战
瑞克-桑切斯11 小时前
Kubernetes 1.28 保姆级新手学习教程
运维·学习·docker·云原生·容器·kubernetes
数据库急诊室_阿哲11 小时前
一次割接后的性能复核记录:基线、样本、回滚点
运维·数据库·dba
忆挽篱笙歌12 小时前
systemV进程通信
linux·运维·服务器
飞奔的瓜牛13 小时前
Wireshark 抓包实战:呼叫中心项目中的 SIP、DTMF 与 RTP 分析
运维·wireshark
Decay__14 小时前
SQLServer 监控体系构建 —— sql_exporter + Prometheus + Grafana 全栈实战
运维·数据库·sql·mysql·架构
遇雪长安15 小时前
wslc 来了:Docker Desktop 还要留着吗?
运维·docker·容器
csdn_aspnet15 小时前
【Docker 攻略】MySQL 安裝篇
运维·mysql·docker·容器