[Visual Studio Code] SFTP config > 기술자료 | 해피정닷컴

[Visual Studio Code] SFTP config > 기술자료

본문 바로가기

사이트 내 전체검색

[Visual Studio Code] SFTP config > 기술자료

etc언어 [Visual Studio Code] SFTP config

페이지 정보


본문



ftp/sftp 동기화 확장입니다.
링크 : https://marketplace.visualstudio.com/items?itemName=liximomo.sftp

sftp 의 config 설정에 맞게 값을 다양하게 변경해서 사용할 수 있습니다
옵션을 기술하고 그것을 사용하는데 주의사항을 이야기 해봅니다

sftp 는 리눅스 서버에서 사용하는 방식이므로, 윈도우 서버 접속할때는 정보가 달라야 합니다
윈도우서버는 ftp 만 가능하며, remotePath 옵션은 사용이 불가능합니다.


1. 기본값
{
"name": "My Server",
"host": "localhost",
"protocol": "sftp",
"port": 22,
"username": "username",
"remotePath": "/",
"uploadOnSave": true
}


2. 연결
f1 키를 누른 후 SFTP : List All 을 입력하여 누른 후 연결할 서버 주소를 클릭하면 연결이 됩니다.


3. 해피정닷컴에서 주로 사용하는 sftp.json
{
    "name": "ProjectName",
    "host": "host",
    "protocol": "sftp",
    "port": 22,
    "username": "아이디",
    "remotePath": "/home/xx/",
    "uploadOnSave": false,
    "password": "비밀번호",
    "secure": true,
    "passive": true,
    "syncOption": {
    },
    "watcher":{
        "files": "**/*",
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store",
        "./sftpConfig.json",
        ".sftp.json",
        "**/node_modules"
    ],
    "downloadOnOpen": "confirm"
}


4. 사용 가능한 옵션들 sftp.json
{
    "name": "ProjectName",
    "host": "host",
    "protocol": "sftp",
    "port": 22,
    "username": "아이디",
    "remotePath": "/home/xx/",
    "uploadOnSave": true,
    "password": "비밀번호",
    "privateKeyPath": null,
    "passphrase": null,
    "secure": true,
    "passive": true,
    "syncMode": "update",
    "syncOption": {
        "delete" : false,
        "skipCreate" : false,
        "ignoreExisting" : false,
        "update" : true
    },
    "watcher":{
        "files": "**/*",
        "autoUpload": false,
        "autoDelete": false
    },
    "ignore": [
        "**/.vscode/**",
        "**/.git/**",
        "**/.DS_Store",
        "./sftpConfig.json",
        ".sftp.json",
        "**/node_modules"
    ],
    "downloadOnOpen": "confirm",
    "interactiveAuth": false
}


name : A string to identify your config.
     이 연결을 정의하는 고유한 이름

host : Hostname or IP address of the server.
     연결할 서버 주소 (ex. 192.168.0.1)

protocol : sftp or ftp

port : Port number of the server.
     설정값 : 22

username : Username for authentication.
     연결할 서버의 username

password : 비밀번호 (보안 상의 문제가 걱정된다면 rsa 키를 이용한 로그인 사용 -> "privateKeyPath" : "rsa키 경로")

remotePath : The absolute path on remote
     설정값 : /
     로컬과 연결할 서버의 Path. 처음 입력되어 있는 "/" 를 그대로 두면 root 디렉토리로 연결
     윈도우서버는 ftp 만 가능하며, remotePath 옵션은 사용이 불가능

uploadOnSave : 로컬에서 수정하면 파일은 서버로 자동 업로드 하거나 명시적으로 업로드 할 수 있습니다.
     설정값 : false  ,  true , "confirm"

secure : 
     설정값 : true
     윈도우서버는 ftp 만 가능하며, secure 옵션은 사용이 불가능

passive : 
     (sftp.json 환경설정에서 on/off 가능 : "passive": true/false) 

sshConfigPath : ssh 설정 경로
     설정값 : null
     조건 설정이 있는 경우는 지정하자.

syncMode : 동기화모드
     설정값 : "full" , "update"

syncOption : 서버와 동기화 옵션 설정
syncOption.delete : Delete extraneous files from dest dirs.
     대상 디렉토리에서 관련 없는 파일을 삭제합니다.
syncOption.skipCreate : Skip creating new files on dest.
     dest에서 새 파일 생성을 건너뜁니다.
syncOption.ignoreExisting : Skip updating files that exist on dest.
     dest에 있는 파일 업데이트를 건너뜁니다.
syncOption.update : Update the dest only if a newer version is on the src filesystem.
     최신 버전이 src 파일 시스템에 있는 경우에만 dest를 업데이트합니다.

watcher : 항목 내의 files에 해당하는 파일, 폴더를 감지하여 서버와 동기화 여부를 설정할 수 있는 옵션
watcher.files : glob patterns that are watched and when edited outside of the VS cdoe editor are processed. Set uploadOnSave to false when you watch everything.
     VS cdoe 편집기 외부에서 감시되고 편집될 때 glob 패턴이 처리됩니다. 모든 것을 볼 때 uploadOnSave를 false로 설정하십시오.
watcher.autoUpload : 자동 업데이트
     설정값 : false  ,  true
     VSCode 이외에서 변경되었을 경우에 리모트를 자동으로 갱신한다.
watcher.autoDelete : 자동 삭제
     설정값 : false  ,  true
     VSCode 이외에서 삭제되었을 경우에 리모트를 자동으로 삭제한다.

ignore : Same behavior as gitignore, all path reltative to context of the current config
     설정값 : []
     서버와 동기화되지 않도록 하는 파일/폴더를 정의하는 옵션. gitignore와 같다고 생각하면 됩니다.

downloadOnOpen : Download the file from the remote server whenever it is opened
     설정값 : false  ,  true  ,  "confirm"
     로컬에서 파일을 열면 알아서 서버와 동기하여 파일을 열어줍니다. 서버와 로컬을 한몸 처럼 싱크 해 줍니다.

interactiveAuth : Set to true for enable verifyCode dialog. 
     Keyboard interaction authentication mechanism. For example using Google Authentication (Multi factor)
     Note: (requires the server to have keyboard-interactive authentication enabled)
     설정값 : false  ,  true



참고자료
https://poalim.tistory.com/19
https://soolper.tistory.com/24
https://yuddomack.tistory.com/entry/vscode-ftp로-원격접속-코드-동기화
https://code-study.tistory.com/39
https://blackcatcats.tistory.com/2
https://github.com/liximomo/vscode-sftp
https://daydreamdrift.com/2019/01/19/sftp-vscode
https://blog.titanwolf.in/a?ID=01500-f8bacf00-9cd8-4da7-99be-8cd89119f6c7
https://titanwolf.org/Network/Articles/Article?AID=524be5fc-64d9-4dc4-9e24-43f34f17f6f8

댓글목록

등록된 댓글이 없습니다.


Total 2,633건 1 페이지
  • RSS
기술자료 목록
2633
MySQL   127  2024-03-29 14:14 ~ 2024-03-29 14:14  
2632
그누보드   450  2024-02-23 18:40 ~ 2024-02-24 06:13  
2631
JavaScript   413  2024-02-16 18:50 ~ 2024-02-16 20:37  
2630
Java   353  2024-02-06 16:49  
2629
PHP   544  2024-02-06 16:42  
2628
호스팅   507  2024-01-29 12:54  
2627
PHP   537  2024-01-26 11:04 ~ 2024-01-26 11:13  
2626
MySQL   849  2024-01-08 17:37 ~ 2024-03-14 16:00  
2625
SQL   793  2024-01-08 12:36  
2624
영카트   983  2024-01-04 14:57  
2623
일반   1760  2023-12-15 18:33  
2622
Android   1440  2023-11-30 18:48 ~ 2023-11-30 19:41  
2621
전자결제   2495  2023-11-23 19:53  
2620
PHP   1840  2023-11-20 10:56 ~ 2023-11-20 11:14  
2619
Linux   1729  2023-11-09 19:55  
2618
그누보드   1780  2023-11-06 20:38  
2617
Linux   1753  2023-11-01 21:41 ~ 2023-11-02 10:30  
2616
영카트   1881  2023-10-07 23:31  
2615
SNS   2811  2023-09-24 17:56  
2614
ClassicASP   2518  2023-09-14 08:38  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: 서울센터 (08393) 서울시 구로구 디지털로32가길 16 파트너스타워2차 1206-280호
        대전센터 (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 지원1동 205호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 2014-서울구로-0074 [사업자등록확인]  
Copyright 2001~2024 해피정닷컴. All Rights Reserved.