카테고리 없음

VSCode 를 사용하여 리눅스 원격 SSH 접속하여 코딩

 케이군  2023. 2. 2. 14:20

1. visual studio code 설치

먼저 아래 싸이트에 들어가서 VSCode를 받아서 설치를 합니다.

윈도우, 맥, 리눅스 용이 있어서 자신이 사용하는 OS에 맞게 설치를 진행합니다.

 

 https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

 

사이트에 접속하면 다운로드 버튼을 눌러 설치파일을 다운 받을 수 있습니다.

 

 

다운받은 설치파일을 실행하여 설치를 진행합니다.

 

 

 

2. Extensions 설치

VSCode 설치가 완료되었으면 사이드바에 있는 Extensions를 눌러 Remote SSH를 설치합니다.

Name: Remote - SSH
Id: ms-vscode-remote.remote-ssh
Description: Open any folder on a remote machine using SSH and take advantage of VS Code's full feature set.
Version: 0.96.0
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh

 

3. Remote - SSH 설정

설정 버튼을 눌러 설정을 진행합니다.

 

설정으로 들어갑니다.

설정파일을 지정해줍니다.

설정파일은 아래와 같이 설정해주면 됩니다.

키파일이 없을 경우 패스워드를 통해 접속을 할 수 있습니다.

Host linux-server-01
  HostName 192.168.10.10
  User root
  Port 22
  IdentityFile "C:\Users\user\.ssh\root.pem"