[-문구-Compeople-문구-]

+::System::/Linux2014. 2. 24. 17:57
서버에서 sftp 서브시스템을 거부함 / subsystem request for sftp failed, subsystem not found / sftp접속 불가.

 

* 오랜만에 접속하는 리눅스 시스템...

 

* editplus 이용하여, sftp를 사용하려 하였으나. 에러메세지가 난다..

  "서버에서 sftp 서브시스템을 거부함" 라는 창이 뜨면서 에러가 뜬다.

 

* ssh는. 정상적으로 잘. 붙는다..(서비스 정상)

 

* 로그확인..

[root@icms ~]# tail -f /var/log/messages
Aug 25 06:32:57 icms xinetd[5569]: Started working: 0 available services
Aug 25 06:33:19 icms sshd[5574]: Accepted password for root from ::ffff:106.245.239.34 port 59499 ssh2
Aug 25 06:33:19 icms sshd[5574]: subsystem request for sftp
Aug 25 06:33:19 icms sshd[5574]: subsystem request for sftp failed, subsystem not found
Aug 25 06:34:17 icms sshd[5577]: Accepted password for icms from ::ffff:106.245.239.34 port 59527 ssh2
Aug 25 06:34:17 icms sshd[5579]: subsystem request for sftp
Aug 25 06:34:17 icms sshd[5579]: subsystem request for sftp failed, subsystem not found
Aug 25 06:35:53 icms sshd[5583]: Accepted password for icms from ::ffff:106.245.239.34 port 59557 ssh2
Aug 25 06:35:53 icms sshd[5585]: subsystem request for sftp
Aug 25 06:35:53 icms sshd[5585]: subsystem request for sftp failed, subsystem not found

 

* 확인해보니. 에러메세지 처럼, 서브시스템을 확인 못했단다..

 

* ssh 환경설정 파일 수정...

[root@icms ~]# vi /etc/ssh/sshd_config 

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit

..................

중략...

..................

#ChrootDirectory none

# no default banner path
#Banner none

# override default of no subsystems
# Subsystem        sftp           /usr/libexec/sftp-server  <= 당초

Subsystem        sftp           /usr/libexec/openssh/sftp-server  # <= 주석해제.. 변경.
Port 8022 

 

* sshd 서비스 재시작...

[root@icms ~]# /etc/rc.d/init.d/sshd restart
sshd (À»)¸¦ Á¾·áÇÔ:                                        [  È®ÀΠ ]
sshd¸¦ ½ÃÀÛÇÔ:                                             [  È®ÀΠ ]
[root@icms ~]# tail -f /var/log/messages   
Aug 25 06:41:59 icms xinetd[5626]: Started working: 0 available services
Aug 25 06:42:06 icms sshd[5629]: Accepted password for icms from ::ffff:106.245.239.34 port 59743 ssh2
Aug 25 06:42:07 icms sshd[5631]: subsystem request for sftp
Aug 25 06:42:07 icms sshd[5631]: error: subsystem: cannot stat /usr/libexec/sftp-server: No such file or directory
Aug 25 06:42:07 icms sshd[5631]: subsystem request for sftp failed, subsystem not found
Aug 25 06:44:15 icms sshd[5613]: Received signal 15; terminating.
Aug 25 06:44:15 icms sshd: sshd -TERM succeeded
Aug 25 06:44:15 icms sshd[5643]: Server listening on :: port 8022.
Aug 25 06:44:15 icms sshd[5643]: error: Bind to port 8022 on 0.0.0.0 failed: Address already in use.
Aug 25 06:44:15 icms sshd:  succeeded

 

** 정상 접속 확인.

Posted by Compeople