Digital Ocean에 물방울이 생겼습니다. 그 자격 증명은 내 친구 중 한 명과 공유됩니다. 우리는 SSH를 통해 다음과 같이 연결했습니다.
ssh root@IP_Address
이제 집중력 부족으로 인해 서버에서 다음 명령을 실행하여 실수를 했습니다.
sudo chmod -R 777 /
어떤 서버가 더 이상 어떤 것(SSH/FTP/...)을 통해 연결되지 않기 때문입니다. 다음과 같은 오류가 발생합니다.
ssh_exchange_identification: read: Connection reset by peer
이것은의 출력입니다ssh root@IP_Address -vv
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: resolving "IP_Address" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to IP_Address [IP_Address] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/talha/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 ssh_exchange_identification: read: Connection reset by peer
호스팅된 프로젝트와 데이터베이스의 최신 백업이 없으므로 최대한 빨리 도와주세요.
미리 감사드립니다!
답변1
최소한 DO 콘솔을 통해 루트로 로그인하십시오(참조:여기지침을 보려면)
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
/root/.ssh
( 즉 rwx------
, /root/.ssh/authorized_keys
의 액세스 권한을 로 설정합니다 rw-------
. SSH는 다른 사용자가 액세스할 수 있는 파일을 신뢰하지 않습니다.
/etc/ssh의 파일에 대한 올바른 액세스 권한을 설정해야 할 수도 있습니다.
-rw-r--r-- 1 root root 300261 Aug 11 2016 moduli
-rw-r--r-- 1 root root 1830 Sep 19 2016 ssh_config
-rw------- 1 root root 672 Oct 2 2016 ssh_host_dsa_key
-rw-r--r-- 1 root root 605 Oct 2 2016 ssh_host_dsa_key.pub
-rw------- 1 root root 227 Oct 2 2016 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 177 Oct 2 2016 ssh_host_ecdsa_key.pub
-rw------- 1 root root 411 Oct 2 2016 ssh_host_ed25519_key
-rw-r--r-- 1 root root 97 Oct 2 2016 ssh_host_ed25519_key.pub
-rw------- 1 root root 1675 Oct 2 2016 ssh_host_rsa_key
-rw-r--r-- 1 root root 397 Oct 2 2016 ssh_host_rsa_key.pub
-rw-r--r-- 1 root root 338 Sep 19 2016 ssh_import_id
-rw-r--r-- 1 root root 2598 Sep 19 2016 sshd_config