Debian 12에서는 SSH 로그인만 작동하지 않습니다.

Debian 12에서는 SSH 로그인만 작동하지 않습니다.

문제는 설치 중에 Debian이 SSH를 자동으로 구성하기 때문에 발생합니다. 핵폭탄 설치 외에는 마땅한 해결책이 발견되지 않았습니다.

그래서 나는 이것을 따랐다.지도 시간SSH 키 로그인을 설정하는 방법과 관련하여 제가 무엇을 하든 비밀번호 없이는 로그인할 수 없습니다. 하루 종일 작동하도록 노력했는데 솔직히 전환하는 것만으로도 지쳤습니다. ssh -vvv 및 내 서버 sshd_config

OpenSSH_9.2p1 Debian-2, OpenSSL 3.0.9 30 May 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 72.230.162.46 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/blaine/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/blaine/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 72.230.162.46 [72.230.162.46] port 10580.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
debug1: identity file /home/blaine/.ssh/id_rsa type -1
debug1: identity file /home/blaine/.ssh/id_rsa-cert type -1
debug1: identity file /home/blaine/.ssh/id_ecdsa type -1
debug1: identity file /home/blaine/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/blaine/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/blaine/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/blaine/.ssh/id_ed25519 type -1
debug1: identity file /home/blaine/.ssh/id_ed25519-cert type -1
debug1: identity file /home/blaine/.ssh/id_ed25519_sk type -1
debug1: identity file /home/blaine/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/blaine/.ssh/id_xmss type -1
debug1: identity file /home/blaine/.ssh/id_xmss-cert type -1
debug1: identity file /home/blaine/.ssh/id_dsa type -1
debug1: identity file /home/blaine/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 72.230.162.46:10580 as 'blaine'
debug3: put_host_port: [72.230.162.46]:10580
debug3: record_hostkey: found key type ED25519 in file /home/blaine/.ssh/known_hosts:1
debug3: record_hostkey: found key type RSA in file /home/blaine/.ssh/known_hosts:2
debug3: record_hostkey: found key type ECDSA in file /home/blaine/.ssh/known_hosts:3
debug3: load_hostkeys_file: loaded 3 keys from [72.230.162.46]:10580
debug1: load_hostkeys: fopen /home/blaine/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: have matching best-preference key type [email protected], using HostkeyAlgorithms verbatim
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: [email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: [email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:JvAJjOp0E5K3E0osjrt3okUe1VEKtS2HUVoRhZVd3H0
debug3: put_host_port: [72.230.162.46]:10580
debug3: put_host_port: [72.230.162.46]:10580
debug3: record_hostkey: found key type ED25519 in file /home/blaine/.ssh/known_hosts:1
debug3: record_hostkey: found key type RSA in file /home/blaine/.ssh/known_hosts:2
debug3: record_hostkey: found key type ECDSA in file /home/blaine/.ssh/known_hosts:3
debug3: load_hostkeys_file: loaded 3 keys from [72.230.162.46]:10580
debug1: load_hostkeys: fopen /home/blaine/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '[72.230.162.46]:10580' is known and matches the ED25519 host key.
debug1: Found key in /home/blaine/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: ssh_get_authentication_socket_path: path '/tmp/ssh-XXXXXXN08dgn/agent.1232'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /home/blaine/.ssh/id_rsa 
debug1: Will attempt key: /home/blaine/.ssh/id_ecdsa 
debug1: Will attempt key: /home/blaine/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/blaine/.ssh/id_ed25519 
debug1: Will attempt key: /home/blaine/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/blaine/.ssh/id_xmss 
debug1: Will attempt key: /home/blaine/.ssh/id_dsa 
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
debug1: kex_input_ext_info: [email protected]=<0>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/blaine/.ssh/id_rsa
debug3: no such identity: /home/blaine/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/blaine/.ssh/id_ecdsa
debug3: no such identity: /home/blaine/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/blaine/.ssh/id_ecdsa_sk
debug3: no such identity: /home/blaine/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /home/blaine/.ssh/id_ed25519
debug3: no such identity: /home/blaine/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /home/blaine/.ssh/id_ed25519_sk
debug3: no such identity: /home/blaine/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /home/blaine/.ssh/id_xmss
debug3: no such identity: /home/blaine/.ssh/id_xmss: No such file or directory
debug1: Trying private key: /home/blaine/.ssh/id_dsa
debug3: no such identity: /home/blaine/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
[email protected]'s password: 
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
Authenticated to 72.230.162.46 ([72.230.162.46]:10580) using "password".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: client_repledge: enter
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: client_input_hostkeys: received RSA key SHA256:fpbyouqx+HhMcONsxnm3wDjaLwlw1jDUXCifGmG3Ohc
debug3: client_input_hostkeys: received ECDSA key SHA256:rxTk95GOVGISyEpy07jOknRry9Qw8xnn0oQjSm8WXKs
debug3: client_input_hostkeys: received ED25519 key SHA256:JvAJjOp0E5K3E0osjrt3okUe1VEKtS2HUVoRhZVd3H0
debug3: put_host_port: [72.230.162.46]:10580
debug1: client_input_hostkeys: searching /home/blaine/.ssh/known_hosts for [72.230.162.46]:10580 / (none)
debug3: hostkeys_foreach: reading file "/home/blaine/.ssh/known_hosts"
debug3: hostkeys_find: found ssh-ed25519 key at /home/blaine/.ssh/known_hosts:1
debug3: hostkeys_find: found ssh-rsa key at /home/blaine/.ssh/known_hosts:2
debug3: hostkeys_find: found ecdsa-sha2-nistp256 key at /home/blaine/.ssh/known_hosts:3
debug1: client_input_hostkeys: searching /home/blaine/.ssh/known_hosts2 for [72.230.162.46]:10580 / (none)
debug1: client_input_hostkeys: hostkeys file /home/blaine/.ssh/known_hosts2 does not exist
debug3: client_input_hostkeys: 3 server keys: 0 new, 3 retained, 0 incomplete match. 0 to remove
debug1: client_input_hostkeys: no new or deprecated keys from server
debug3: client_repledge: enter
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending environment.
debug3: Ignored env SHELL
debug3: Ignored env SESSION_MANAGER
debug3: Ignored env WINDOWID
debug3: Ignored env QT_ACCESSIBILITY
debug3: Ignored env COLORTERM
debug3: Ignored env XDG_CONFIG_DIRS
debug3: Ignored env XDG_SESSION_PATH
debug3: Ignored env XDG_MENU_PREFIX
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env DESKTOP_SESSION
debug3: Ignored env SSH_AGENT_PID
debug3: Ignored env GTK_MODULES
debug3: Ignored env XDG_SEAT
debug3: Ignored env PWD
debug3: Ignored env LOGNAME
debug3: Ignored env XDG_SESSION_DESKTOP
debug3: Ignored env XDG_SESSION_TYPE
debug3: Ignored env XAUTHORITY
debug3: Ignored env XDG_GREETER_DATA_DIR
debug3: Ignored env HOME
debug1: channel 0: setting env LANG = "en_US.UTF-8"
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env LS_COLORS
debug3: Ignored env XDG_CURRENT_DESKTOP
debug3: Ignored env VTE_VERSION
debug3: Ignored env XDG_SEAT_PATH
debug3: Ignored env XDG_SESSION_CLASS
debug3: Ignored env TERM
debug3: Ignored env USER
debug3: Ignored env DISPLAY
debug3: Ignored env SHLVL
debug3: Ignored env XDG_VTNR
debug3: Ignored env XDG_SESSION_ID
debug3: Ignored env XDG_RUNTIME_DIR
debug3: Ignored env XDG_DATA_DIRS
debug3: Ignored env PATH
debug3: Ignored env GDMSESSION
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env OLDPWD
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug3: client_repledge: enter
debug1: pledge: fork
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Linux PandaCraft 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Sep 22 23:29:00 2023 from 192.168.1.208

답변1

이유는 모르겠지만 Debian을 설치하기로 선택하고 서버를 SSH 서버로 구성했기 때문에 서버에 Debian을 다시 설치했는데 이제 완벽하게 실행되기 때문인 것 같습니다. 제가 하고 있는 일은 핵 옵션이고 확실히 설치와 관련된 몇 가지 옵션이 있기 때문에 이 질문을 마무리하는 것을 고려하지 않겠습니다.

내 솔루션:핵무기:설치하는 동안 Debian의 사전 구성된 구성을 선택하지 마십시오. 전체 시스템을 새로 설치해야 했습니다. 데비안이 SSH 서버를 미리 구성하도록 선택했다면 더 나은 옵션을 찾지 못한 것입니다.

관련 정보