How to log in to a Linux cloud server through SSH

Table of contents

What is SSH?

SSH login cloud server

VScode configures the ssh environment

VSCode configures Linux platform C/C++ programming environment


 

What is SSH?


Secure Shell (Secure Shell Protocol, SSH for short) is an encrypted network transmission protocol that can provide a secure transmission environment for network services in an insecure network. SSH realizes the connection between the SSH client and the server by creating a secure tunnel in the network. The most common use of SSH is to log in to the system remotely. People usually use SSH to transmit command line interface and execute commands remotely. 


SSH login cloud server


Login command:

ssh 用户名@服务器公网ip

(You don’t have ordinary users at the beginning, and you usually use root as the user name to log in directly, and the server ip is the cloud server ip address in the blue box introduced above!) 


ea3a562caac149559f8763044e357c1f.png

 As shown in the picture above, you are prompted to enter the password. When you enter the password, there will be no prompt after password:, so it is normal that there is no response after the input. Please enter the correct key and press Enter! It is similar to the computer on the mobile terminal.


Recommended shells for computers: VScode  ,   xshell  , Windows 10 and above can use the PowerShell that comes with the system or the terminal that runs cmd under win+r .

The recommended shell on the mobile phone: JuiceSSH .

 

XShell official website: XSHELL - NetSarang Website

JuiceSSH官网:JuiceSSH - Free SSH client for Android


However, VScode is more commonly used in general work, here is the configuration method of VScode!


VScode configures the ssh environment


1. First enter the VScode extension management to install the SSH plug-in! 

845b61907d6d4876911632e658497c32.png


2. Select the Remote - SSH plug-in to install!

9604c055769642178d307484b5b5a099.png

 

4b0ee79a20314763a3ea64ef23005f2e.png


4. View the SSH configuration file

a83c0e3dd8394d599c29160c592f5adf.png

Click here to enter the configuration file

e7b12ab87fb24fcba0c8f88fa86abb09.png

The SSH that was not configured at the beginning defaults to what is shown in the figure


5. Configure SSH

7d9b0727d7274caeb32279c2f3cefc8b.png

64fdb522183c4dbba1092ea71840e183.png

ssh 用户名@服务器公网ip

//如果是普通用户则用户名与账户名相同,root账号用户名为root
1454a5d31f6e4449b29d9021070d950d.png

View the configuration file again and complete the entry of information

17faeda2b5744f51bbec454a9cf84fd3.png

 Note: If it is not displayed, please restart VScode and check again!

69bde449b606461e9e2ca496ebb8ccfa.png

 Note: There may be an option after selecting the platform for the first configuration, just select continue!

9bc0c8ca15f4414a9ee4b00689ad3a09.png

3e78f4b5e295470b86ffc9704d8010c6.png


6. Enter the command line terminal

5993fc4964a54ee0bc68813b77942c64.png

The position in the picture is in the lower left corner of the VScode interface!

e52cbe7ddc4345cc8407d301332df7e0.png

37f769fbed1246caa84ad98d2c59d0b2.png

Take Linux as an example here, just start the operation!


Note: After the first login is successful, every time you enter VScode, you will be automatically prompted to log in!

VSCode configures Linux platform C/C++ programming environment


  • C/C++ plugin, required
  • C/C++ Extension Pack, download and install it directly contains the plug-ins needed for vscode to write C/C++ projects
  • C/C++ Themes theme settings, you can click Settings in the plug-in
  • Chinese(Simplified) (Simplified Chinese plug-in)
  • vscode-icons-change the file icon in the editor
  • filesize - A plugin that displays the size of source files in the lower left corner
  • IncludeAutoComplete - Automatic header inclusion
  • GBKtoUTF8 - Automatically convert GBK to UTF8
  • koroFileHeader - header comment add/update plugin
  • GDB Debug is used for C/C++ code debugging (add the -g option when compiling to debug normally, GDB debugging may be very stuck due to the influence of the network, the specific use depends on the individual)

Thanks for reading, I hope this little article can help you!

 

Guess you like

Origin blog.csdn.net/m0_73446322/article/details/128807205
Recommended