大网数据广告活动
服务器运维问答

SSH hanging after sending env LANG, only on one computer on network

· 52CE 我爱测

I'm unable to SSH into a server from one machine on my network. I can successfully SSH using the exact same port, address, user, and ssh key from other machines on my network. When I try to connect, half of my MOTD is printed out…

问题原文

原帖链接 · catsock · CC BY-SA 4.0

I'm unable to SSH into a server from one machine on my network. I can successfully SSH using the exact same port, address, user, and ssh key from other machines on my network. When I try to connect, half of my MOTD is printed out and then the connection hangs. I figured it might be an issue with my terminal reading the MOTD, but I've tried several different terminals with the WSL bash shell and the problem is consistent.

What could the issue be, or what would be the next step to diagnosing this?

The server is running Ubuntu 20.04.2 LTS and OpenSSH 8.2p1


Desired

Actual


Successful Output

debug1: Authentication succeeded (publickey).
Authenticated to REDACTED ([REDACTED]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email omitted]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email omitted] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_TERMINAL = iTerm2
debug1: Sending env LC_TERMINAL_VERSION = 3.3.7

                       _              _
 ___ _    ___   ___ | | ___   _  | | _____   
/ | '_ \ / _ \ / _ \| |/ / | | |/ _` |/ _ \ \ / /
\__ \ |_) | (_) | (_) |   <| |_| | (_| |  /\ V /
|___/ ./ \___/ \___/|_|\_\\__, |\__,_|\___| \_/
    |_|                     |___/

 Last login..........: root at Sat Apr 17 18:25 from REDACTED

Failure Output

debug1: Authentication succeeded (publickey).
Authenticated to REDACTED ([REDACTED]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email omitted]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email omitted] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8

                       _              _
 ___ _ __   ___   ___ | | ___   _  __| | _____   __
/ __| '_ \ / _ \ / _ \| |/ / | | |/ _` |/ _ \ \ / /
\__ \ |_) | (_) | (_) |   <| |_| | (_| |  __/\ V /

已采纳解答

原帖链接 · catsock · CC BY-SA 4.0

This turned out to be an issue with WSL. As described in this issue, executing the following in Windows CMD solved the problem:

netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-04-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。