--- title: "서버 원격 접속 오류 지원 가이드 (Linux)" slug: "compute-server-remote-login-error-support-guide-linux-classic" tags: ["server"] updated: 2026-08-20T09:03:22Z published: 2026-08-20T09:03:22Z canonical: "guide-gov.ncloud-docs.com/compute-server-remote-login-error-support-guide-linux-classic" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide-gov.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # 서버 원격 접속 오류 지원 가이드 (Linux) Classic 환경에서 이용 가능합니다. ## ACG 확인 1. 접속하고자 하는 source 의 IP 혹은 subnet 이 ACG 상에서 허용되었는지 확인 주의 1. SSH : TCP 22, RDP : TCP 3389 open이 필요합니다. (서버상에서 port 설정을 변경하셨다면 변경된 port로 open해 주십시오.) 2. port포워딩과 공인 IP 를 동시에 할당하면 공인 IP 로 통신할 수 없습니다. 공인 IP 사용 시 port 포워딩 설정을 제거해 주십시오. ## 공통 현상 ![server_connect_image01](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image01.png) ssh 서비스가 22번 port로 정상 동작하지 않으면 "서버 접속 콘솔" 이 자동적으로 활성화됩니다. rdp 서비스가 3389번 port로 정상 동작하지 않으면 "서버 접속 콘솔" 이 자동적으로 활성화됩니다. ## Linux(CentOS 7 기준) ### 1. 데몬 상태 확인 #### a. 데몬이 정상적으로 running 중인 상태인지 확인합니다. ``` systemctl status sshd ``` ![server_connect_image02](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image02.png) 데몬 상태가 inactive 일 경우 start 를 시도하고, 에러가 발생할 경우 서버로그를 확인하여 sshd 데몬이 정상 Start 될 수 있도록 조치해 주십시오. #### b. ssh port를 LISTEN 중인지 확인합니다. ``` netstat -nap | grep ssh ``` ![server_connect_image03](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image03.png) ssh 서비스가 22 번 port로 LISTEN하는 것을 확인합니다. Ncloud에서 제공하는 서버의 기본 설정은 22 port입니다. 다른 port로 수정한 경우 해당 port로 검색해야 하고 ACG에서도 해당 port를 오픈해야 합니다. #### c. port 및 ListenAddress 에 설정된 부분이 있는지 확인합니다. ``` vi /etc/ssh/sshd_config ``` ![server_connect_image04](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image04.png) 기본 설정은 주석 처리가 되어 있습니다. ### 2. hosts.deny 설정 상태 확인 hosts.allow, hosts.deny 파일은 특정 클라이언트에게만 서비스 허용 및 차단을 제어하는 파일입니다. hosts.allow, hosts.deny 파일에 설정된 부분이 있는지 확인합니다. 기본 설정은 주석 처리가 되어 있습니다. ![server_connect_image05](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image05.png) 참고 /etc/hosts.allow, /etc/hosts.deny 파일은 tcp_wrappers만 제어하는 파일입니다. rule 적용 순서는 다음과 같습니다. 1. /etc/hosts.allow 파일에 정의된 것은 허용 2. /etc/hosts.allow 파일에 정의되지 않고, /etc/hosts.deny 파일에 정의된 것은 거부 3. /etc/hosts.allow, /etc/hosts.deny 두 파일에 다 정의되지 않은 것은 허용 tcp_wrappers 는 xinetd 에 의해 관리되는 데몬들의 특정 서비스에 한해서 제어가 가능합니다. <예시> ssh, telnet, ftp 등 ### 3. 방화벽 확인 #### a. iptables iptables.service가 설치된 상태라면 데몬이 inactive가 되어도 rule에 영향을 받습니다. 데몬이 inactive 상태라도 iptables rule에서 ssh를 deny하는 rule을 제외합니다. 기본 설정은 적용된 rule이 없습니다. ![server_connect_image06](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image06.png) #### b. firewalld firewalld는 데몬이 inactive 상태면 rule이 적용되지 않습니다. 만약 firewalld 실행이 필요하다면, ssh를 deny하는 rule을 제외합니다. 기본 설정은 적용된 rule이 없습니다. ![server_connect_image07](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image07.png) ### 4. 라우팅 확인 ![server_connect_image08](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image08.png) eth0에 대한 default route가 없으면 통신이 되지 않을 수 있습니다. ### 5. 권한 이슈 확인 공공은 기본 계정이 root가 아닌 ncloud입니다. 고객이 sudoers 설정을 변경하거나, 특정 디렉터리(ex. /bin/su) 의 권한을 수정하게 되면 ncloud 에서 root 권한을 사용할 수 없습니다. ncloud로 접속이 불가할 경우 콘솔을 이용하여 root로 접속하고, ncloud 계정의 권한을 올바르게 수정해야 합니다. 참고 공공 환경에서 root 계정의 ssh 접근은 막혀 있기 때문에 콘솔로만 접근이 가능합니다. ## Linux (Ubuntu 18.04 기준) ### 1. 데몬 상태 확인 #### a. 데몬이 정상적으로 running 중인 상태인지 확인합니다. ``` systemctl status sshd ``` ![server_connect_image10](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image10.png) 데몬 상태가 inactive일 경우 start를 시도하고, 에러가 발생할 경우 서버 로그를 확인하여 sshd 데몬이 정상 Start 될 수 있도록 조치해 주십시오. #### b. ssh port를 LISTEN 중인지 확인합니다. ``` netstat -nap | grep ssh ``` ![server_connect_image11](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image11.png) ssh 서비스가 22 번 port로 LISTEN하는 것을 확인합니다. Ncloud에서 제공하는 서버의 기본 설정은 22 port입니다. 다른 port로 수정했다면 해당 port로 검색해야 하고 ACG에서도 해당 port를 오픈해야 합니다. #### c. port 및 ListenAddress 에 설정된 부분이 있는지 확인합니다. ``` vi /etc/ssh/sshd_config ``` ![server_connect_image12](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image12.png) 기본 설정입니다. ### 2. hosts.deny 설정 상태 확인 hosts.allow, hosts.deny 파일은 특정 클라이언트에게만 서비스 허용 및 차단을 제어하는 파일입니다. hosts.allow, hosts.deny 파일에 설정된 부분이 있는지 확인합니다. 기본 설정은 ssh 통신은 허용되고 telnet, ftp 등의 통신은 거부됩니다. ![server_connect_image28](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image28.png) 참고 /etc/hosts.allow, /etc/hosts.deny 파일은 tcp_wrappers만 제어하는 파일입니다. rule 적용 순서는 다음과 같습니다. 1. /etc/hosts.allow 파일에 정의된 것은 허용 2. /etc/hosts.allow 파일에 정의되지 않고, /etc/hosts.deny 파일에 정의된 것은 거부 3. /etc/hosts.allow, /etc/hosts.deny 두 파일에 다 정의되지 않은 것은 허용 tcp_wrappers 는 xinetd 에 의해 관리되는 데몬들의 특정 서비스에 한해서 제어가 가능합니다. <예시> ssh, telnet, ftp 등 ### 3. 방화벽 확인 #### a. iptables iptables.service 가 설치된 상태라면 데몬이 inactive 가 되어도 rule 에 영향을 받습니다. **데몬이 inactive 상태라도 iptables rule 에서 ssh 를 deny 하는 rule 을 제외** 합니다. 기본 설정은 적용된 rule 이 없습니다. ![server_connect_image14](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image14.png) #### b. ufw ufw는 데몬이 inactive 상태면 rule이 적용되지 않습니다. 만약 ufw 실행이 필요하다면, ssh를 deny하는 rule을 제외합니다. 기본 설정은 적용된 rule이 없습니다. ![server_connect_image15](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image15.png) ### 4. 라우팅 확인 ![server_connect_image16](https://cdn.document360.io/f2d93c92-8957-408f-94df-b9b370f76a32/Images/Documentation/server_connect_image16.png) eth0 에 대한 default route 가 없으면 통신이 되지 않을 수 있습니다. ### 5. 권한 이슈 확인 공공은 기본 계정이 root가 아닌 ncloud입니다. 고객이 sudoers 설정을 변경하거나, 특정 디렉터리(ex. /bin/su) 의 권한을 수정하게 되면 ncloud에서 root 권한을 사용할 수 없습니다. ncloud로 접속이 불가할 경우 콘솔을 이용하여 root로 접속하고 ncloud 계정의 권한을 올바르게 수정해야 합니다. 참고 공공 환경에서 root 계정의 ssh 접근은 막혀 있기 때문에 콘솔로만 접근이 가능합니다.