vscode


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 

0
0
이 글을 페이스북으로 퍼가기 이 글을 트위터로 퍼가기 이 글을 카카오스토리로 퍼가기 이 글을 밴드로 퍼가기

기타

번호 제목 글쓴이 날짜 조회수
13 DNS 서버 취약점 보안 조치 관리자 10-13 385
12 백엔드 서비스인 포켓베이스 관리자 04-22 805
11 공휴일 API 관리자 08-26 697
10 유사도별로 이미지를 구성 관리자 05-23 567
9 vscode +1 관리자 04-26 920
8 VSCode 확장 SFTP Error: Handshake failed: 관리자 01-07 1,006
7 요약 관리자 01-04 677
6 마크다운 사용법 관리자 12-22 612
5 깃허브 요약 2 관리자 12-22 699
4 깃허브 요약 1 관리자 12-22 502
3 mysterydata 관리자 10-22 700
2 자바그룹웨어 +1 관리자 10-22 1,006
1 오픈소스 그룹웨어 관리자 10-21 1,206