Slickedit sftp/SSH 접속 설정하기

Slickedit 2015. 12. 29. 12:01 posted by CecilDeSK
반응형

 Slickedit sftp/SSH 접속 설정하기


Slickedit 에서ssh 로 접속하기 위해서는 Cygwin + openssh 환경이 필요하다. Openssh for windows 등 몇가지 버전을 가지고 시도해 보았지만 권한 및 계정설정 문제로 아직 성공하지는 못하였다. Cygwin + openssh환경에서는 크게 무리없이 적용가능하다. 여기서는 Cygwin + openssh 환경에서 Slickedit 의 sftp/ssh 접속 설정을 설명한다.

 

Cygwin 및 부가적으로 openssh를 설치하고 sshd를 서비스로 등록하도록 하자

Cygwin 설치화일을 다운로드 받도록 하자(이하 Win7 x64환경에서 설치한다고 가정한다)

 

openssh설치를 완료하였으면 시스템 환경변수를 등록하여 준다. 내컴퓨터->속성->고급->환경변수->시스템변수 에서 CYGWIN=ntsec 설정.

Cygwin 쉘에서 ssh-host-config 명령을 실행한다. 대부분 설정에 "yes"이고 CYGWIN 옵션은 "ntsec"로 설정한다.

 

Cecil@Cecil-PC ~

$ ssh-host-config

 

*** Info: Generating missing SSH host keys

ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519

*** Info: Creating default /etc/ssh_config file

*** Info: Creating default /etc/sshd_config file

 

*** Info: StrictModes is set to 'yes' by default.

*** Info: This is the recommended setting, but it requires that the POSIX

*** Info: permissions of the user's home directory, the user's .ssh

*** Info: directory, and the user's ssh key files are tight so that

*** Info: only the user has write permissions.

*** Info: On the other hand, StrictModes don't work well with default

*** Info: Windows permissions of a home directory mounted with the

*** Info: 'noacl' option, and they don't work at all if the home

*** Info: directory is on a FAT or FAT32 partition.

*** Query: Should StrictModes be used? (yes/no) yes

 

*** Info: Privilege separation is set to 'sandbox' by default since

*** Info: OpenSSH 6.1.  This is unsupported by Cygwin and has to be set

*** Info: to 'yes' or 'no'.

*** Info: However, using privilege separation requires a non-privileged account

*** Info: called 'sshd'.

*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ                                                    ME.privsep.

*** Query: Should privilege separation be used? (yes/no) yes

*** Info: Note that creating a new user requires that the current account have

*** Info: Administrator privileges.  Should this script attempt to create a

*** Query: new local account 'sshd'? (yes/no) yes

*** Info: Updating /etc/sshd_config file

 

*** Query: Do you want to install sshd as a service?

*** Query: (Say "no" if it is already installed as a service) (yes/no) yes

*** Query: Enter the value of CYGWIN for the daemon: [] ntsec

*** Info: On Windows Server 2003, Windows Vista, and above, the

*** Info: SYSTEM account cannot setuid to other users -- a capability

*** Info: sshd requires.  You need to have or to create a privileged

*** Info: account.  This script will help you do so.

 

*** Info: It's not possible to use the LocalSystem account for services

*** Info: that can change the user id without an explicit password

*** Info: (such as passwordless logins [e.g. public key authentication]

*** Info: via sshd) when having to create the user token from scratch.

*** Info: For more information on this requirement, see

*** Info: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1

 

*** Info: If you want to enable that functionality, it's required to create

*** Info: a new account with special privileges (unless such an account

*** Info: already exists). This account is then used to run these special

*** Info: servers.

 

*** Info: Note that creating a new user requires that the current account

*** Info: have Administrator privileges itself.

 

*** Info: No privileged account could be found.

 

*** Info: This script plans to use 'cyg_server'.

*** Info: 'cyg_server' will only be used by registered services.

sshd서비스의 시작은 Cygwin 쉘에서는 cygrunsrv –S sshd

윈도우 명령창에서는 net start sshd

관리->서비스에 등록한 이름 "OpenSSHd" 로 서비스를 시작할수있다.

윈도우에 사용자를 Cygwin 과 동기화 하려면

mkpasswd –local > /etc/passwd

mkgroup –local > /etc/group

 

 

SlickEdit 설정부분

File -> FTP -> Default Options 메뉴에서 SSH/SFTP탭 에서 SSH Executable에 Cygwin의 openssh의 실행화일 경로

(ex. C:\cygwin64\bin\ssh.exe)를 입력하여 주고 Subsystem/ Servicename에 서비스 이름을 등록하여 준다. (ex. sftp)

 

File -> FTP -> Default Options 메뉴에서 FTP Profile Manager, Edit FTP Profile 에서 Server Type SFTP/SSH로 변경하고 Auth type를 일반적으로는 auto에 설정한다.

 

접속이 되지 않을시는 FTP Default Options 의 Debug탭에서 Verbose ssh 등의 옵션을 켜서 에러 로그를 확인하도록 한다.

 

반응형