From bfad09dfacc726a8fc7b3665dc7e558c92c23d2a Mon Sep 17 00:00:00 2001 From: Terrasse Date: Fri, 20 Dec 2024 17:20:48 +0800 Subject: [PATCH] update (Fri Dec 20 05:20:48 PM CST 2024) --- docs/2024.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/2024.md b/docs/2024.md index 286fde8..3333abe 100644 --- a/docs/2024.md +++ b/docs/2024.md @@ -4,6 +4,33 @@ record my journey in CS, gain from history, sometimes scandal. ### 12.20 +#### Windows无法scp + +报错: + +``` +scp: Received message too long 1347625027 +scp: Ensure the remote shell produces no output for non-interactive sessions. +``` + +原因是PowerShell没有正确处理scp发起的非交互式会话,输出了额外的字符,导致scp异常 + +解决方案: + +新建一个用户专用于scp,并编辑`C:/ProgramData/ssh/sshd_config`,禁用其TTY: + +``` +Match User + PermitTTY no +``` + +重启sshd服务: + +```powershell +net stop ssh +net start ssh +``` + #### 安卓熄屏不锁屏 有时需要保持安卓手机长期唤醒状态,但又不希望屏幕开着费电或者发生烧屏,可以关闭屏幕显示(需要ROOT):