当前位置:网站首页>终端便捷ssh(免密)连接
终端便捷ssh(免密)连接
2022-06-30 05:10:00 【CN天狼】
普通ssh方法
物理机ssh连接虚拟机
没基础的可以这样连:复杂
终端快捷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方式会抽空发
到时候在这打个传送
边栏推荐
- Force buckle 209 Minimum length subarray
- Solution to 293 problems in the week of Li Kou
- Unity call Exe program
- Unity ugui text value suspended enlarged display add text background
- Force buckle 27 Removing Elements
- Connect() and disconnect() of socket in C #
- Very nervous. What should I do on the first day of software testing?
- Special folders in unity3d and their meanings
- Detailed explanation of sorting sort method of JS array
- Parkour demo
猜你喜欢
Unity3d packaging and publishing APK process
Force buckle 59 Spiral matrix II
mmcv常用API介绍
力扣349. 两个数组的交集
Connect() and disconnect() of socket in C #
Basic operations of Oracle data
Exploration of unity webgl
Output directory of log files after unity3d packaging
Chinese pycharm changed to English pycharm
Records of problems encountered in unity + hololens development
随机推荐
Display steerable 3D model in front of unity UI
The file has been downloaded incorrectly!
Exploration of unity webgl
Pytorch的安装以及入门使用
力扣977. 有序数组的平方
Chapter 8 primitive processing of OpenGL super classic (version 7)
Procedural animation -- inverse kinematics of tentacles
Operation of JSON file
Modbus protocol register
Intellj idea generates jar packages for projects containing external lib to other projects. The method refers to the jar package written by itself
Intellj idea jars projects containing external lib to other project reference methods - jars
LxC and LXD container summary
The difference between SVG and canvas
GoLand No Tests Were Run : 不能使用 fmt.Printf() <BUG>
How can the international trading platform for frying US crude oil guarantee capital security?
很紧张,第一天做软件测试,需要做什么?
Generate a slice of mesh Foundation
Tcp/ip protocol details Volume I (Reading Guide)
Special folders in unity3d and their meanings
[notes] unity Scrollview button page turning