04.DevTools/VisualStudio Code
[VS Code]SSH 원격 접속 방법
basicinfo119
2023. 12. 8. 19:45
728x90
반응형
- Visual Studio Code (VS Code) 에서 원격지 리눅스 서버에 접속 하는 방법을 소개합니다.
Visual Studio Code 설치
아래 경로에서 Visual Studio Code 를 다운로드 받습니다.
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
VS Code 실행 및 Remote - SSH 확장 팩을 설치
- VS code 가 설치가 완료 되었다면 Remote - SSH 확장팩 설치를 진행 합니다.
Remote - SSH 접속 설정
- 원격지 서버에 접속 하기 위한 연설 설정 정보를 셋팅 합니다.
- F1 혹은 Ctrl + Shift + P 버튼을 눌러서 Remote SSH Configuration 파일을 수정 합니다.
- ~.ssh/config
Host [alias]
HostName [ip addr]
User [account_name]
Port [port number]
IdentityFile [key location]
Remote 서버 접속
- VS Code 에서 Centos7 서버에 접속을 합니다.
- .ssh/config 에 작성한 접속 정보를 이용해서 원격지 서버에 접속을 합니다.
- 정상적으로 접속이 되면 아래와 같이 원격지 서버에서 접속해서 간단한 테스트를 진행 해볼수 있습니다.
- test.sh 라는 쉘 스크립트를 작성 하고 아래 터미널 창에서 수행을 합니다.
728x90
반응형