vscode免密ssh登录ubantu && 配置ubantu静态ip

1.vscode免密ssh登录ubantu

1、windows创建秘钥, 有秘钥就不用创建

复制代码
ssh-keygen -t rsa

2、将id_rsa.pub文件内的内容追加到ubantu的authorized_keys即可

2.配置ubantu静态ip

之前ubantu一直用的是动态ip,ubantu的ip变一次我就要从新配置一次ssh十分不方便,直接改成静态ip

复制代码
sudo nano /etc/network/interfaces
bash 复制代码
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto ens37
iface ens37 inet static
    address 192.168.163.145
    netmask 255.255.255.0
    gateway 192.168.163.1
    dns-nameserver 192.168.163.1

reboot重启

相关推荐
L1624761 分钟前
OpenSSH 半自动升级方案(独立编译 + 手动迁移 + 重建 systemd 服务)
linux·服务器·ssh
Soari1 小时前
SSH 主机密钥冲突
运维·网络·ssh
清溪5491 小时前
Erlang-SSH未授权(CVE-2025-32433)复现
安全·ssh
黑泽明Coding2 小时前
使用密钥登录ssh
运维·ssh
且听风吟_xincell2 小时前
用 TypeScript 从零写一个 TCP 聊天室(上)—— 网络编程入门实战
网络·tcp/ip·typescript
zly35006 小时前
CentOS上可以 ping通 IP但不能 ping通域名,ping不通域名
linux·tcp/ip·centos
wbc103155586 小时前
基于 VSCode + Icarus 的 Verilog 编译和仿真
ide·vscode·编辑器
weixin_452077646 小时前
oai compatible provider for copilot for deepseek UI界面设置
vscode·copilot
xiaobobo33307 小时前
vscode如何免秘钥登入Ubuntu
vscode·ssh·免秘钥登入·ubuntu虚拟机
それども7 小时前
怎么理解TCP的状态
java·网络·网络协议·tcp/ip·dubbo