当前位置:网站首页>[server usage record] log in to the remote server through the springboard machine and transfer files
[server usage record] log in to the remote server through the springboard machine and transfer files
2022-07-28 06:29:00 【CELINE_ HUANG】
explain : This article records the pit I stepped on when using a remote server for this Xiaobai , You are welcome to criticize and correct
List of articles
- One 、 Generate a local key and add it to the server
- Two 、 Use VSCode Extension plug-in Remote-SSH Log on to the remote server
- 3、 ... and 、 Through the springboard machine A Log on to the remote server B
- Four 、 Migrate the data to the remote server through the springboard machine B On
- 5、 ... and 、 stay VSCode There are springboard and target machines
- 6、 ... and 、 Reference resources
One 、 Generate a local key and add it to the server
First, input the code in the terminal to generate the local key and public key :
ssh-keygen -t rsa

Will generate id_rsa and id_rsa.pub, They correspond to your local public key and key , We will id_rsa.pub Send it to the server administrator or upload it to the corresponding platform , That is, you are allowed to log in locally on the server
Be careful :key There are two formats , One is rsa, One is dsa, Some servers do not support dsa Of !
Two 、 Use VSCode Extension plug-in Remote-SSH Log on to the remote server
stay VSCode Find the plug-in in the extension and download , Then click... In remote explorer ‘+’, Input :
ssh Account name @ Server address -p Port number
Such as :
ssh [email protected] -p 123
Then it is verified by the server fingerprint Then you can login successfully ~
One more word , stay vscode Li press crtl+shift+` You can open the terminal ( I've been looking for it myself for a long time )
3、 ... and 、 Through the springboard machine A Log on to the remote server B
1. Log on to the skip machine
Daily development , For safety and other considerations , Before connecting to the remote server , You need to connect the springboard machine first , This method is associated with Two 、 Use VSCode Extension plug-in Remote-SSH Log on to the remote server Agreement , Don't go into details .
2. Generate the key in the springboard
The key point to log in to the remote server through the springboard machine is , It's not just you This machine Your key needs to be uploaded to Springboard machine A, Springboard machine A You also need to generate a key to upload to remote server B( I didn't upload the key of the springboard machine the first time I used it , So I can't log in anyway )
Same method : Open the terminal input of the springboard machine ssh-keygen -t rsa
Four 、 Migrate the data to the remote server through the springboard machine B On
Transfer files :scp file name user name @ The server B Of IP Address : The server B Destination address on
scp test.py [email protected]:/home/huang/
Transfer folder :scp -r file name user name @ The server B The address of : The server B Destination address on
scp test/folder [email protected]:/home/huang/
5、 ... and 、 stay VSCode There are springboard and target machines
Host JumpMachine
HostName 1.1.1.1
User root
Port 22
Host TargetMachine
HostName 1.1.1.1
User root
ProxyCommand ssh -W %h:%p JumpMachine
6、 ... and 、 Reference resources
https://blog.csdn.net/weixin_34790159/article/details/116557869
边栏推荐
- [yolov5] environment construction: win11 + mx450
- ConNeXt
- Talking about fluke optical cable certification? What is CFP? What is OFP?
- ICC2(一)Preparing the Design
- Design and analysis of contactor coil control circuit
- Talk about the "hybrid mode" of esxi virtual switch and port group
- 解决内存占用比应用进程占用高的问题
- Esxi on arm 10/22 update
- Random life-1
- Terminal resistance detailed signal complete series hardware learning notes 7
猜你喜欢

Matlab simulation of radar imaging 2 - pulse compression and windowing

PyTorch 学习笔记 3 —— DATASETS & DATALOADERS & TRANSFORMS

Systemmediasize startup option added in esxi 7.0 update 1C

VAN(DWConv+DWDilationConv+PWConv)

Fluke dtx-sfm2 single mode module of a company in Hangzhou - repair case

A NOVEL DEEP PARALLEL TIME-SERIES RELATION NETWORK FOR FAULT DIAGNOSIS

雷达成像 Matlab 仿真 1 —— LFM信号及其频谱

听说你也在实习|当我采访了几个大三实习生之后。

t-SNE降维可视化

mixup_ ratio
随机推荐
Overall understanding of PLC
低功耗设计-Power Switch
qt中获取当前目录
VB OCX applied to Web
Vs code basic configuration and beautification
clickhouse聚合之内存不足怎么办?那就提升聚合性能
Detailed explanation of creepage distance and electrical clearance
Communication between DSP and FPGA
Precautions for EMI design of switching power supply circuit in layout process
mixup_ ratio
Redhawk Dynamic Analysis
Vscode中,无法打开源文件 “Adafruit_GFX.h“
雷达成像 Matlab 仿真 3 —— 多目标检测
Talk about the "hybrid mode" of esxi virtual switch and port group
IMS-FACNN(Improved Multi-Scale Convolution Neural Network integrated with a Feature Attention Mecha
雷达成像 Matlab 仿真 1 —— LFM信号及其频谱
MFC 使用控制台打印程序信息
Machine learning note 5 - logistic regression
EfficientNET_ V1
Web scrolling subtitles (marquee example)