当前位置:网站首页>终端便捷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方式会抽空发
到时候在这打个传送
边栏推荐
- Solution to the 292 week match of Li Kou
- Some problems encountered in unity steamvr
- Ugui uses its own function to realize reverse mask
- Revit Secondary Development - - Project use Panel features not opened
- Log writing specification
- Bessel curve with n control points
- Procedural animation -- inverse kinematics of tentacles
- [vcs+verdi joint simulation] ~ take the counter as an example
- Pytorchcnn image recognition and classification model training framework
- Harbor API 2.0 query
猜你喜欢

Procedural animation -- inverse kinematics of tentacles

Basic operations of Oracle data
![[note] usage model tree of the unity resource tree structure virtualizingtreeview](/img/3e/fe5610c797a14554ad735172c3ab54.jpg)
[note] usage model tree of the unity resource tree structure virtualizingtreeview
Sourcetree usage

Unity2019.3.8f1 development environment configuration of hololens2

Unity3d lookat parameter description

中文版PyCharm改为英文版PyCharm

【VCS+Verdi聯合仿真】~ 以計數器為例

Win10 vs2015 compiling curaengine

Unity project hosting platform plasticscm (learn to use 1)
随机推荐
Some problems encountered in unity steamvr
Operation of JSON file
Force buckle 27 Removing Elements
Unity project hosting platform plasticscm (learn to use 2)
Unity3d get screen width and height
Four methods of unity ugui button binding events
力扣704. 二分查找
Unity/ue reads OPC UA and OPC Da data (UE4)
Pytorchcnn image recognition and classification model training framework
amd锐龙CPU A320系列主板如何安装win7
Installation and getting started with pytoch
On mask culling of unity
力扣59. 螺旋矩阵 II
Chapter 8 primitive processing of OpenGL super classic (version 7)
JPA composite primary key usage
中文版PyCharm改为英文版PyCharm
Solution to Autowired annotation warning
【 VCS + Verdi joint simulation】 ~ Taking Counter as an Example
ParticleSystem in the official Manual of unity_ Collision module
[notes] unity Scrollview button page turning