当前位置:网站首页>[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
边栏推荐
- VI and VIM commands
- Communication between DSP and FPGA
- Beta分布(概率的概率)
- WebService error maximum message size quota for incoming messages (65536) has been exceeded
- 详解安装msdn 2015及其注意事项
- mysql删表不删库
- Pytorch learning notes 1 - quick start
- Shuffle Net_v1-shuffle_v2
- Web scrolling subtitles (marquee example)
- ICC2(一)Preparing the Design
猜你喜欢

Learning notes on hardware circuit design 2 -- step-down power circuit

EMC experiment practical case ESD electrostatic experiment

mixup_ ratio

clickhouse聚合之内存不足怎么办?那就提升聚合性能

set_multicycle_path

ConNeXt

Synopsys Multivoltage Flow

Arduino reads the analog voltage_ How mq2 gas / smoke sensor works and its interface with Arduino

Pytorch learning notes 3 - datasets & dataloaders & transforms

clickhouse建宽表多少列最合适?
随机推荐
Talk about the "hybrid mode" of esxi virtual switch and port group
Cronbach’s α? Kmo coefficient? Factor load? The most understandable course of questionnaire reliability and validity analysis in history!!! (SPSS and AMOS)
VI and VIM commands
t-SNE降维可视化
PyTorch 学习笔记
雷达成像 Matlab 仿真 3 —— 多目标检测
VB OCX applied to Web
NPM yarn related operations
Talking about fluke optical cable certification? What is CFP? What is OFP?
qt批量操作控件,并设置信号槽
CLIP Learning Transferable Visual Models From Natural Language Supervision
Random life-1
Redhawk Dynamic Analysis
Learning notes of hardware circuit design 1 -- temperature rise design
mixup_ratio
PT physical aware based on multi voltage
Low power design isolation cell
How to use the bit error meter?
TVs tube parameters and selection
EMC experiment practical case ESD electrostatic experiment