질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

SSH의 공개키 사용한 인증문제 부탁드립니다

작성자 정보

  • 신동휘 작성
  • 작성일

컨텐츠 정보

본문

SSH 공개키사용한 인증에 질문이 있어서 이렇게 글을 올리게 되었습니다.

현재 구성 상황은 아래와 같습니다.

  PC1(Windows)-SSH Client                       PC2(Linux)-SSH Server

       192.168.1.100                                             192.168.1.102

       SecureCRT 사용중

 

위와 같은 상황에서 윈도우서 SecureCRT사용하여 공개키와 비밀키를 생성하였습니다.

(생성된 파일이름 : 공개키 - Identity.pub, 비밀키 - Identity)

그리고 나서 리눅스 SSH Server의 /root/.shh 폴더로 Identity.pub를 복사하고

파일이름은 authorized_keys로 바꾸었습니다.

이후에 SSHD를 Restart시켰습니다.

그리고 나서 공개키 방식으로 PC1에서 SecureCRT로 접속하려하는데 실패하였습니다.

SecureCRT에서는 SSH2 서버에 root가 공개키 인증방식으로 접속하는데 실패하였으며, username과 공개/비밀키를 확인하라는 메세지가 나타나고 있습니다.

뭐가 잘못된 것일까요?

아래에는 /etc/ssh/sshd_config 파일을 첨부합니다.

Port 22
Protocol 2
ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 3600
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 120
PermitRootLogin yes
#StrictModes yes

PubkeyAuthentication yes
RSAAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
# rhosts authentication should not be used
#RhostsAuthentication no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

#AFSTokenPassing no

# Kerberos TGT Passing only works with the AFS kaserver
#KerberosTgtPassing no

# Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt no

#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes

#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no

# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,138 명
  • 현재 강좌수 :  36,196 개
  • 현재 접속자 :  616 명