[LINUX] Edit the file of the SSH connection destination server on the server with VS Code

things to do

The method of editing files on the server with VS Code has already been mentioned in Qiita, and I also learned it here. By the way, I referred to the following article. Four ways to edit files on the server with VS Code

This time, as a reminder of myself, the above article I will write it in more detail and leave it like a procedure manual for a rugged monitoring operator w Well, if you don't have the time, I think it's faster to see the explanation in the link above.

It is assumed that VSCode is included and a server that can connect to SSH is running, but if you have not done so, please introduce it by referring to the following article. Installing Visual Studio Code (Windows version) Install CentOS in VirtualBox

Plugin installation

Left-click [Extensions] in the [View] tab. image.png

Type Remote-SSH in the search window and Left-click [Install] in the narrowed down plug-in "Remote-SSH". image.png

When you install it, the plugin description tab will open automatically, so close it. image.png

Left-click [Command Palette ...] in [View Tab]. For the time being, you can also open it with the shortcut Ctrl + Shift + P. image.png

In the search window Remote-SSH: Connect to Host ...

Then left-click on the narrowed down "Remote-SSH: Connect to Host ...". image.png

Left-click [+ Add New SSH Host ...]. image.png

Enter [ssh username @ hostname].

image.png

Since the screen for selecting the setting file to be updated is displayed, select.

The screen is displayed at the bottom left, so left-click [Connect]. image.png

A new VS Code window opens. In the search window, enter your server login password Press the Enter key. image.png

If you left-click [Open File ...] from the [File] tab, you can select the file on the connection destination server.

image.png image.png

Recommended Posts

Edit the file of the SSH connection destination server on the server with VS Code
Edit and debug the code in the Raspberry Pi with VS Code's SSH connection feature
Convert the character code of the file with Python3
Settings to debug the contents of the library with VS Code
Synchronizing with the server port forwarding ssh on localhost fails [Resolved]
Edit files directly on Linux with Visual Studio Code Remote SSH
I tried to build an environment where work in the Docker container on the remote server can be done directly from the local VS Code with SSH connection
Check the existence of the file with python
[Python] Get the character code of the file
Change the destination batfish server of pybatfish
Get the width of the div on the server side with Selenium + PhantomJS + Python
VS Code freezes & PC crashes when I start the server with go
Log in to the remote server with SSH
Introducing Paramiko + scp ~ SSH connection ~ File transfer with SCP
Drawing tips with matplotlib on the server side
I tried Flask with Remote-Containers of VS Code
SSH login to the target server from Windows with a click of a shortcut
The story of trying Sourcetrail × macOS × VS Code
Read the csv file with jupyter notebook and write the graph on top of it
Try touching the micro: bit with VS Code + Python
Visualization of the connection between malware and the callback server
Easy build of C ++ code with CMake on Docker
[Postgresql] SSH connection to the external DB server from the client
Read the GRIB2 file of the Japan Meteorological Agency with pygrib
Check the operating status of the server with the Linux top command
Until the start of the django tutorial with pycharm on Windows
Debug by attaching to the Python process of the SSH destination
The story that Python stopped working with VS Code (Windows 10)
Reload the server set up with gunicorn when changing the code
Connect to centos6 on virtualbox with ssh connection from Mac
Install the latest version of Git on your Linux server
Get the host name of the host PC with Docker on Linux
Python with VS Code (Windows 10)
Explain the code of Tensorflow_in_ROS
Debug Python with VS Code
Check the code with flake8
Read the coordinates of the plot on the graph with Python-matplotlib (super beginner)
Get the strongest environment with VS Code, Remote-Containers and remote docker-daemon
A note on how to check the connection to the license server port
Let's measure the test coverage of pushed python code on GitHub.
On Linux, the time stamp of a file is a little past.
Backup of server materials using shell scripts (with file generation management)
How to develop containers on remote servers with VS Code Remote-Containers
I studied with Kaggle Start Book on the subject of kaggle [Part 1]
Format the CSV file of "National Holiday" of the Cabinet Office with pandas
Check the memory protection of linux kerne with the code for ARM
Let's summarize the degree of coupling between modules with Python code
The idea of feeding the config file with a python file instead of yaml
I checked the image of Science University on Twitter with Word2Vec.
Settings until the Dango project is started on the server with Pycharm
[Django] Display registration data associated with users on the registration / edit form (Form)
How to run the practice code of the book "Creating a profitable AI with Python" on Google Colaboratory
I tried to output the rpm list of SSH login destination to an Excel sheet with Python + openpyxl.
Summary of the basic flow of machine learning with Python
Visualize the flow rate of tweets with Diamond + Graphite + Grafana
Follow the flow of QAOA (VQE) at the source code level of Blueqat
Follow the file hierarchy with fts
Bookkeeping Learned with Python-The Flow of Bookkeeping-
Edit the file of the SSH connection destination server on the server with VS Code
Align the size of the colorbar with matplotlib
Check the existence of the file with python
The third night of the loop with for
The second night of the loop with for
Count the number of characters with echo