우분투 18.04 에 ssh 접속시 로그인 후 즉시 연결 종료 되는 증상 문의

우분투 설치 및 부팅과 관련된 문제 해결

Moderator: Dry8r3aD

Post Reply
hugeval
Posts: 35
Joined: 2011/05/24 Tue 1:03 am

우분투 18.04 에 ssh 접속시 로그인 후 즉시 연결 종료 되는 증상 문의

Post by hugeval » 2021/07/29 Thu 2:17 pm

안녕하세요

집에 남는 폰(갤럭시 J5 2016/안드로이드6.0마시멜로) 에 UserLand 앱을 설치하고 우분투 18.04 를 설치하였습니다 (폰 루팅 하지 않음)
간단한 개인 웹서버로 사용하는게 목적입니다

ssh 설치후 원격으로 접속시 로그인 성공하자마자 연결이 종료되버리는 문제때문에 문의 드리게 되었습니다.
로그인이 되는것같긴한데 왜 바로 연결이 종료되는지 이유를 모르겠습니다.


아래 메세지는 윈도우의 Windows Terminal 로 원격접속하는 과정입니다.
로그인이 되었다가 맨 마지막쯤에 "Connection to xxx.xxx.xxx.xxx closed." 라고 뜨면서 종료 되는데요.

혹시 원인 좀 알수있을까요?

(집 공유기 포트포워딩 22번에서 8022번으로 변경, ssh 설정에서도 8022로 변경)









PS D:\> ssh user00@xxx.xxx.xxx.xxx -p 8022 -v
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 8022.
debug1: Connection established.
debug1: identity file C:\\Users\\user00/.ssh/id_rsa type 0
debug1: identity file C:\\Users\\user00/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\user00/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\user00/.ssh/id_dsa-cert type -1
debug1: identity file C:\\Users\\user00/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\user00/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\user00/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\user00/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\user00/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\user00/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to xxx.xxx.xxx.xxx:8022 as 'user00'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:VQyDn/oJVeb86m/cDIrKlwbfvuhAV3+cM5kjRIjtcaU
debug1: Host '[xxx.xxx.xxx.xxx]:8022' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\user00/.ssh/known_hosts:2
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\user00/.ssh/id_rsa RSA SHA256:CFPUIMri4kEuBsCarlC4LzvemYr4UcAgIPzgSNe89KA
debug1: Will attempt key: C:\\Users\\user00/.ssh/id_dsa
debug1: Will attempt key: C:\\Users\\user00/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\user00/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\user00/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: C:\\Users\\user00/.ssh/id_rsa RSA SHA256:CFPUIMri4kEuBsCarlC4LzvemYr4UcAgIPzgSNe89KA
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\\Users\\user00/.ssh/id_dsa
debug1: Trying private key: C:\\Users\\user00/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\user00/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\user00/.ssh/id_xmss
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
user00@xxx.xxx.xxx.xxx's password:
debug1: Authentication succeeded (password).
Authenticated to xxx.xxx.xxx.xxx ([xxx.xxx.xxx.xxx]:8022).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 3.10.49-13444620 armv7l)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.
Last login: Thu Jul 29 04:15:40 2021 from xxx.xxx.xxx.xxx
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to xxx.xxx.xxx.xxx closed.
Transferred: sent 2320, received 2796 bytes, in 0.8 seconds
Bytes per second: sent 3051.4, received 3677.5
debug1: Exit status 254
PS D:\>

Post Reply