当前位置:网站首页>终端便捷ssh(免密)连接
终端便捷ssh(免密)连接
2022-06-30 05:10:00 【CN天狼】
普通ssh方法
物理机ssh连接虚拟机
没基础的可以这样连:复杂
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存失败,源站可能有防盗下来851229742)(C:\Users\CNsirius\AppData\Roaming\Typora\typora-user-images\image-20220610164418979.png)]](/img/26/eaa6a2a434db66421b24cdedab3050.png)

终端快捷ssh
复制's前面的
打开终端设置
左侧添加新配置文件->添加新控制文件
然后填写第二行即命令行
ssh 虚拟机登录用户名@虚拟机IP
其实就是 ssh上面复制的
保存

即可在物理机终端快速打开

免密ssh登录
在物理机运行:
ssh-keygen
后面第一个路径回车
后面密码直接回车(即可实现免密码登录)

Your identification has been saved in C:\Users\ /.ssh/id_rsa.
Your public key has been saved in C:\Users\ /.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:ln6ZkrhHWH*********tRbGBeooF4g \ @
The key's randomart image is:
+---[RSA 3072]----+
| .o.*.+ |
|.. o..+ * . |
|***********. |
| *.o.o+.o |
|. = +.o*S . |
| ********* |
+----[SHA256]-----+
找到第一行的那个目录,把id_rsa.pub文件复制到虚拟机
执行
cat id_rsa.pub >> ~/.ssh/authorized_keys
chmod 770 ~/.ssh/authorized_keys
报未找到.ssh的话
要先运行
ssh-keygen和在物理机设置一样
然后终端打开虚拟机就不用输密码了
报错情况
仍需密码:
传到虚拟机的keygen一定要是公钥pub
连接超时
过一段时间之后 连不上
是ip未固定
需将虚拟机ip固定
桥接和net模式固定IP方式会抽空发
到时候在这打个传送
边栏推荐
- Parkour demo
- Unity3d- use animator and code to control task walking
- 力扣349. 两个数组的交集
- Unity Logitech steering wheel access
- Pycharm database tool
- Operation file file class method
- 力扣(LeetCode)180. 连续出现的数字(2022.06.29)
- Installation and getting started with pytoch
- Solution to 293 problems in the week of Li Kou
- Modbus protocol register
猜你喜欢

【VCS+Verdi联合仿真】~ 以计数器为例

Unity ugui text value suspended enlarged display add text background

Procedural animation -- inverse kinematics of tentacles
![[notes] unity Scrollview button page turning](/img/c7/47c4056871d0212ac61524539f0d0e.jpg)
[notes] unity Scrollview button page turning
![[vcs+verdi joint simulation] ~ take the counter as an example](/img/fb/214a4e65c53503ecbc38a5e43523cf.png)
[vcs+verdi joint simulation] ~ take the counter as an example

力扣59. 螺旋矩阵 II

How does unity use mapbox to implement real maps in games?

UE4 method of embedding web pages

Pycharm database tool

Unity project hosting platform plasticscm (learn to use 1)
随机推荐
Four methods of unity ugui button binding events
UE4 method of embedding web pages
003-JS-DOM-Attr-innerText
Force buckle 59 Spiral matrix II
Unity project hosting platform plasticscm (learn to use 2)
Go Land no tests were Run: FMT cannot be used. Printf () & lt; BUG & gt;
Read and save txt files
力扣704. 二分查找
Revit二次開發---未打開項目使用面板功能
How can the international trading platform for frying US crude oil guarantee capital security?
LxC and LXD container summary
Nestjs introduction and environment construction
Unity3d position the model, rotate, drag and zoom around the model to obtain the center point of the model
Unity + hololens publishing settings
PWN入门(2)栈溢出基础
Revit Secondary Development - - Project use Panel features not opened
pytorch中常用损失函数总结
Unity call Exe program
Unity3d get screen width and height
Database base (Study & review for self use)