Firewall을 개방합니다.
2.3 sshd_config을 편집합니다.
마지막 부분에
PidFile C:/tmp/OpenSSH-Win64/sshd.pid 추가 합니다.
위의 내용은 pid파일을 작성할 장소를 설정하는 것입니다.
물론 sshd.pid파일을 쓸수 있는 권한이 있어야 합니다.
sshd를 실행하고 나서 log파일을 보면
error: Couldn't create pid file "./sshd.pid": Permission denied
이런 에러가 일어 나면. 폴더와 파일을 쓰는 패스가 맞지 않은 것이므로
만듯이 sshd프로세스가 pid파일을 쓸수 있는 장소를 선택해 주시길 바라겠습니다.
2.4 Windows의 서버스에서 실행
위의 인스톨이 완료되면 서비스 항목에서 밑의 그림과 같이 보일 것입니다.
그럼 sshd를 보고 실행 해 주시길 바라겠습니다.
3.Linux Server에서 접속
[root@localhost ~]# ssh Administrator@parkssh
The authenticity of host 'parkssh (192.168.xxx.xxx)' can't be established.
ECDSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'parkssh' (ECDSA) to the list of known hosts.
Administrator@parkssh's password:
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved.
Administrator@WORK1 C:\Users\Administrator>dir ドライブ C のボリューム ラベルがありません。 ボリューム シリアル番号は 6AC7-8328 です
C:\Users\Administrator のディレクトリ
2017/07/02 10:57 <DIR> . 2017/07/02 10:57 <DIR> .. 2017/07/02 10:58 <DIR> .ssh 2017/03/18 18:50 <DIR> .VirtualBox 2017/03/02 20:54 <DIR> Contacts 2017/03/02 20:54 <DIR> Desktop 2017/07/02 18:04 <DIR> Documents 2017/06/28 22:19 <DIR> Downloads 2017/03/02 20:54 <DIR> Favorites 2017/03/02 20:54 <DIR> Links 2017/03/02 20:54 <DIR> Music 2017/03/02 20:54 <DIR> Pictures 2017/03/02 20:54 <DIR> Saved Games 2017/03/02 20:54 <DIR> Searches 2017/03/02 20:54 <DIR> Videos 2017/03/18 12:34 <DIR> VirtualBox VMs 0 個のファイル 0 バイト 16 個のディレクトリ 49,632,653,312 バイトの空き領域
Administrator@WORK1 C:\Users\Administrator>
접속이 되었습니다.
이것으로, Zabbix와 Job Arranger에서 사용할수 있는 sshd를 설치 하였습니다.
참조 ERROR대응
1.
Linux에서 접속 했는데 에러가 나는 경우
[root@localhost ~]# ssh Administrator@parkssh
Read from socket failed: Connection reset by peer
[root@localhost ~]#
または
windows のC:\tmp\OpenSSH-Win64\logs\sshd.log 로그에
fatal: sshd_hostkey_sign: ssh_agent_sign failed: agent refused operation
에 있는 경우에는
powershell -ExecutionPolicy Bypass -File FixHostFilePermissions.ps1
명령어 실행이 필요합니다. 명령어를 정리한 부분을 참조해 주세요.
2.
[root@localhost ~]# ssh Administrator@parkssh
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:1
ECDSA host key for 192.168.xxx.xxx has changed and you have requested strict Host key verification failed.