You are not logged in.
Pages: 1
win10
IP : 192.168.11.159
win10's vmware installed arch
IP : 192.168.217.128
vmware maps prot 9222 to 22
win10's vmware installed ubuntu
IP : 192.168.217.130
vmware maps prot 9888 to 22
I want to use other pc which IP : 192.168.11.xxx, same ip section as my Win10's, to ssh login arch.
1.To ssh login arch by using
ssh -v -p9222 xxx@192.168.11.159the result following:
debug1: Next authentication method: password
haoxian@192.168.11.159's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.11.159 ([192.168.11.159]:19222).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Requesting authentication agent forwarding.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: channel 0: free: client-session, nchannels 1
Connection to 192.168.11.159 closed by remote host.
Connection to 192.168.11.159 closed.
Transferred: sent 3056, received 2208 bytes, in 0.1 seconds
Bytes per second: sent 23764.2, received 17169.9
debug1: Exit status -1who /var/log/wtmpshows the login tracks
haoxian pts/1 2020-04-22 14:28 (192.168.11.159)
haoxian pts/1 2020-04-22 14:29 (192.168.11.159)
haoxian pts/1 2020-04-22 14:35 (192.168.11.159)
haoxian pts/1 2020-04-22 15:14 (192.168.11.159)2.To ssh login ubuntu by using
ssh -v -p9888 xxx@192.168.11.159works well.
3.Both arch and ubuntu can connect each other by using IP: 192.168.217.xxx works well too.
4. all pc firewall closed.
I wonder any default configs such as `host.allow` or `host.deny` would limits ssh login?
UPDATE:
point 1 and 2 above, connect by win10's xshell
point 3 above means both arch connect ubuntu by
ssh xxx@192.168.217.130and ubuntu connect to arch by
ssh xxx@192.168.217.128work well.
Last edited by haoxian (2020-04-23 07:57:27)
Offline
Maybe the Arch is only listening to the subnet? AFAIK this can be done on the AllowUsers -line. From a quick glance, this is the only difference in SSHing from the Windows compared to from the Ubuntu (Ubuntu and Arch are in the same subnet, while Windows and the VMs are not).
Post sshd config here from the Arch installation (and perhaps also the one from the Ubuntu to compare).
Or perhaps the windows ssh client is doing something you are not expecting it to do?
Are you trying to log in as the same user?
Last edited by Wild Penguin (2020-04-22 07:47:13)
Offline
I've try add AllowUsers xxx@192.168.11.159 to sshd_config, not working too.
ubuntu's sshd_config:
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
PasswordAuthentication yesarch's sshd_config:
Port 22
LogLevel DEBUG
ChallengeResponseAuthentication no
UsePAM yes
PrintMotd no # pam does that
Subsystem sftp /usr/lib/ssh/sftp-server
PasswordAuthentication yesI do log the right user by `xxx@ip`
Last edited by haoxian (2020-04-23 07:58:42)
Offline
NAT or bridge forwarding?
Same for the ubuntu and arch client?
Did you check the sshd server log (since it terminates the session, it might log "why")?
Offline
NAT or bridge forwarding?
Same for the ubuntu and arch client?
Did you check the sshd server log (since it terminates the session, it might log "why")?
both NAT
same client
arch:
journalctl -u sshdoutput ( after enter password ) :
Apr 23 09:29:16 archlinux sshd[94398]: debug1: userauth-request for user haoxian service ssh-connection method password [preauth]
Apr 23 09:29:16 archlinux sshd[94398]: debug1: attempt 3 failures 2 [preauth]
Apr 23 09:29:16 archlinux sshd[94398]: Accepted password for haoxian from 192.168.11.159 port 52559 ssh2
Apr 23 09:29:16 archlinux sshd[94398]: debug1: monitor_child_preauth: haoxian has been authenticated by privileged process
Apr 23 09:29:16 archlinux sshd[94398]: debug1: monitor_read_log: child log fd closed
Apr 23 09:29:16 archlinux sshd[94398]: User child is on pid 94402
Apr 23 09:29:16 archlinux sshd[94402]: debug1: permanently_set_uid: 1000/985
Apr 23 09:29:16 archlinux sshd[94402]: debug1: rekey in after 134217728 blocks
Apr 23 09:29:16 archlinux sshd[94402]: debug1: rekey out after 134217728 blocks
Apr 23 09:29:16 archlinux sshd[94402]: debug1: ssh_packet_set_postauth: called
Apr 23 09:29:16 archlinux sshd[94402]: debug1: active: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
Apr 23 09:29:16 archlinux sshd[94402]: debug1: Entering interactive session for SSH2.
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_init_dispatch
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
Apr 23 09:29:16 archlinux sshd[94402]: debug1: input_session_request
Apr 23 09:29:16 archlinux sshd[94402]: debug1: channel 0: new [server-session]
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_new: session 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_open: channel 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_open: session 0: link with channel 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_channel_open: confirm session
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_channel_req: channel 0 request auth-agent-req@openssh.com reply 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_by_channel: session 0 channel 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_input_channel_req: session 0 req auth-agent-req@openssh.com
Apr 23 09:29:16 archlinux sshd[94402]: debug1: temporarily_use_uid: 1000/985 (e=1000/985)
Apr 23 09:29:16 archlinux sshd[94402]: debug1: restore_uid: (unprivileged)
Apr 23 09:29:16 archlinux sshd[94402]: debug1: channel 1: new [auth socket]
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_channel_req: channel 0 request pty-req reply 1
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_by_channel: session 0 channel 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_input_channel_req: session 0 req pty-req
Apr 23 09:29:16 archlinux sshd[94402]: debug1: Allocating pty.
Apr 23 09:29:16 archlinux sshd[94398]: debug1: session_new: session 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_pty_req: session 0 alloc /dev/pts/1
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_channel_req: channel 0 request env reply 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_by_channel: session 0 channel 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_input_channel_req: session 0 req env
Apr 23 09:29:16 archlinux sshd[94402]: debug1: server_input_channel_req: channel 0 request shell reply 1
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_by_channel: session 0 channel 0
Apr 23 09:29:16 archlinux sshd[94402]: debug1: session_input_channel_req: session 0 req shell
Apr 23 09:29:16 archlinux sshd[94402]: Starting session: shell on pts/1 for haoxian from 192.168.11.159 port 52559 id 0
Apr 23 09:29:16 archlinux sshd[94402]: Read error from remote host 192.168.11.159 port 52559: Connection reset by peer
Apr 23 09:29:16 archlinux sshd[94402]: debug1: do_cleanup
Apr 23 09:29:16 archlinux sshd[94402]: debug1: temporarily_use_uid: 1000/985 (e=1000/985)
Apr 23 09:29:16 archlinux sshd[94402]: debug1: restore_uid: (unprivileged)
Apr 23 09:29:16 archlinux sshd[94398]: debug1: do_cleanup
Apr 23 09:29:16 archlinux sshd[94398]: debug1: session_pty_cleanup2: session 0 release /dev/pts/1
Apr 23 09:29:16 archlinux sshd[70856]: debug1: main_sigchld_handler: Child exitedLast edited by haoxian (2020-04-23 07:55:41)
Offline
Please edit your posts and embed these outputs in [ code ] [ /code ] tags without the spaces. https://wiki.archlinux.org/index.php/Co … s_and_code
Offline
Client:
Connection to 192.168.11.159 closed by remote host.
Connection to 192.168.11.159 closed.Host:
Apr 23 09:29:16 archlinux sshd[94402]: Starting session: shell on pts/1 for haoxian from 192.168.11.159 port 52559 id 0
Apr 23 09:29:16 archlinux sshd[94402]: Read error from remote host 192.168.11.159 port 52559: Connection reset by peerSeems to be the middle-man, windows FW rule?
Also compare w/ the ubuntu server log.
Offline
Client:
Connection to 192.168.11.159 closed by remote host. Connection to 192.168.11.159 closed.Host:
Apr 23 09:29:16 archlinux sshd[94402]: Starting session: shell on pts/1 for haoxian from 192.168.11.159 port 52559 id 0 Apr 23 09:29:16 archlinux sshd[94402]: Read error from remote host 192.168.11.159 port 52559: Connection reset by peerSeems to be the middle-man, windows FW rule?
Also compare w/ the ubuntu server log.
windows close FW too.
in the question description above,
port mappings is:
vmware maps prot 9222 to arch's port 22
vmware maps prot 9888 to ubuntu's port 22
I'd tried mapping port 9888 to arch's port 22 (not working).
Also compare w/ the ubuntu server log.
after ssh to ubuntu:
run:
who /var/log/wtmpprint:
haoxian pts/4 2020-04-23 16:01 (192.168.11.159)do you mean run this command above??
Offline
I meant activating the sshd log on ubuntu, login there and check that server log and compare it with the one from the arch sshd server.
The ports in that output are not related to the port 22 mappings, they're secondary ports for the actual shell to operate on.
windows close FW too.
Sorry, I don't understand what you mean. Are there rules in the Windows FW that differ (reg. the arch and ubuntu IPs)?
Offline
thanks all.
But I can't figure out this problem, I've tried compare tcpdump's result and sshd login debug log between arch and ubuntu, but no idea.
I asked someone good as linux, no idea too.
Now I start wsl (much light weight then vmware's linux) to ssh arch when I need remote it, cause this issue not frequently.
Last edited by haoxian (2020-04-24 08:02:37)
Offline
Pages: 1