AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1655104

Darwin's questions

Martin Hope
Darwin
Asked: 2022-05-15 19:46:06 +0800 CST

在 WinSCP 中使用“sudo su”shell 连接时出现“跳过启动消息时出错”

  • 6

我的 WinSCP 配置:

File protocol: SCP
user name: namjoo
port: 22
settings > SCP/Shell > Shell:   sudo su -

当我尝试连接时,出现此错误:

跳过启动消息时出错。您的 shell 可能与应用程序不兼容(推荐使用 BASH)。

我的日志文件是:

root@hostname:~# systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-05-14 17:21:37 UTC; 1h 36min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 2519 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 2532 (sshd)
      Tasks: 1 (limit: 19062)
     Memory: 3.1M
     CGroup: /system.slice/ssh.service
             └─2532 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

May 14 18:17:25 hostname sshd[2905]: pam_unix(sshd:session): session closed for user my_username
May 14 18:18:00 hostname sshd[2995]: Accepted password for my_username from 192.168.1.151 port 60242 ssh2
May 14 18:18:00 hostname sshd[2995]: pam_unix(sshd:session): session opened for user my_username by (uid=0)
May 14 18:18:01 hostname sshd[2995]: pam_unix(sshd:session): session closed for user my_username
May 14 18:20:40 hostname sshd[3112]: Accepted password for my_username from 192.168.1.151 port 60495 ssh2
May 14 18:20:40 hostname sshd[3112]: pam_unix(sshd:session): session opened for user my_username by (uid=0)
May 14 18:20:41 hostname sshd[3112]: pam_unix(sshd:session): session closed for user my_username
May 14 18:58:16 hostname sshd[3233]: Accepted password for my_username from 192.168.1.151 port 64655 ssh2
May 14 18:58:16 hostname sshd[3233]: pam_unix(sshd:session): session opened for user my_username by (uid=0)
May 14 18:58:17 hostname sshd[3233]: pam_unix(sshd:session): session closed for user my_username

我的用户是my_username. 我最近安装了它。WinSCP 日志文件内容:

. 2022-05-15 19:57:10.067 --------------------------------------------------------------------------
. 2022-05-15 19:57:10.067 WinSCP Version 5.17.10 (Build 11087) (OS 10.0.19043 - Windows 10 Enterprise)
. 2022-05-15 19:57:10.067 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2022-05-15 19:57:10.067 Log level: Normal
. 2022-05-15 19:57:10.067 Local account: WIN\namjoo
. 2022-05-15 19:57:10.067 Working directory: C:\Program Files (x86)\WinSCP
. 2022-05-15 19:57:10.067 Process ID: 5692
. 2022-05-15 19:57:10.067 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" 
. 2022-05-15 19:57:10.067 Time zone: Current: GMT+4:30, Standard: GMT+3:30 (Iran Standard Time), DST: GMT+4:30 (Iran Daylight Time), DST Start: 3/22/2022, DST End: 9/21/2022
. 2022-05-15 19:57:10.067 Login time: Sunday, May 15, 2022 7:57:10 PM
. 2022-05-15 19:57:10.067 --------------------------------------------------------------------------
. 2022-05-15 19:57:10.067 Session name: [email protected] (Site)
. 2022-05-15 19:57:10.067 Host name: 192.168.1.150 (Port: 22)
. 2022-05-15 19:57:10.067 User name: namjoo (Password: No, Key file: No, Passphrase: No)
. 2022-05-15 19:57:10.067 Tunnel: No
. 2022-05-15 19:57:10.067 Transfer Protocol: SCP
. 2022-05-15 19:57:10.067 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2022-05-15 19:57:10.067 Disable Nagle: No
. 2022-05-15 19:57:10.067 Proxy: None
. 2022-05-15 19:57:10.067 Send buffer: 262144
. 2022-05-15 19:57:10.067 SSH protocol version: 2; Compression: No
. 2022-05-15 19:57:10.067 Bypass authentication: No
. 2022-05-15 19:57:10.067 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2022-05-15 19:57:10.067 GSSAPI: Forwarding: No; Libs: gssapi32,sspi,custom; Custom: 
. 2022-05-15 19:57:10.067 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2022-05-15 19:57:10.067 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2022-05-15 19:57:10.067 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2022-05-15 19:57:10.067 Simple channel: Yes
. 2022-05-15 19:57:10.067 Return code variable: Autodetect; Lookup user groups: Auto
. 2022-05-15 19:57:10.067 Shell: sudo su -
. 2022-05-15 19:57:10.067 EOL: LF, UTF: Auto
. 2022-05-15 19:57:10.067 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2022-05-15 19:57:10.067 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No; Exit code 1 is error: No
. 2022-05-15 19:57:10.067 Local directory: default, Remote directory: /var/www/lichens, Update: Yes, Cache: Yes
. 2022-05-15 19:57:10.067 Cache directory changes: Yes, Permanent: Yes
. 2022-05-15 19:57:10.067 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2022-05-15 19:57:10.067 DST mode: Unix;Timezone offset: 0h 0m
. 2022-05-15 19:57:10.067 --------------------------------------------------------------------------
. 2022-05-15 19:57:10.120 Looking up host "192.168.1.150" for SSH connection
. 2022-05-15 19:57:10.120 Connecting to 192.168.1.150 port 22
. 2022-05-15 19:57:10.136 We claim version: SSH-2.0-WinSCP_release_5.17.10
. 2022-05-15 19:57:10.136 Remote version: SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
. 2022-05-15 19:57:10.136 Using SSH protocol version 2
. 2022-05-15 19:57:10.136 Have a known host key of type ssh-ed25519
. 2022-05-15 19:57:10.152 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2022-05-15 19:57:10.276 Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
. 2022-05-15 19:57:10.276 Host key fingerprint is:
. 2022-05-15 19:57:10.276 ssh-ed25519 255 65:d6:2c:01:60:77:9b:bc:e3:71:b0:92:00:ee:32:88 obPgbW2b75UCCFNcIELRozzTRqFSbLNRNOccK63VtTE=
. 2022-05-15 19:57:10.338 Host key matches cached key
. 2022-05-15 19:57:10.338 Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption
. 2022-05-15 19:57:10.338 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2022-05-15 19:57:10.338 Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption
. 2022-05-15 19:57:10.338 Initialised HMAC-SHA-256 inbound MAC algorithm
! 2022-05-15 19:57:10.338 Using username "namjoo".
. 2022-05-15 19:57:10.369 Server offered these authentication methods: publickey,password
. 2022-05-15 19:57:10.369 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2022-05-15 19:57:14.784 Sent password
. 2022-05-15 19:57:14.810 Access granted
. 2022-05-15 19:57:14.810 Opening main session channel
. 2022-05-15 19:57:15.576 Opened main channel
. 2022-05-15 19:57:15.576 Started a shell/command
. 2022-05-15 19:57:15.607 --------------------------------------------------------------------------
. 2022-05-15 19:57:15.607 Using SCP protocol.
. 2022-05-15 19:57:15.607 Doing startup conversation with host.
. 2022-05-15 19:57:15.623 Skipping host startup message (if any).
> 2022-05-15 19:57:15.623 echo "WinSCP: this is end-of-file:0"
! 2022-05-15 19:57:15.623 sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
. 2022-05-15 19:57:15.623 Session sent command exit status 1
. 2022-05-15 19:57:15.623 Main session channel closed
. 2022-05-15 19:57:15.623 All channels closed
. 2022-05-15 19:57:15.623 Attempt to close connection due to fatal exception:
* 2022-05-15 19:57:15.623 **Connection has been unexpectedly closed.** Server sent command exit status 1.
. 2022-05-15 19:57:15.623 Closing connection.
* 2022-05-15 19:57:15.652 (EFatal) **Connection has been unexpectedly closed.** Server sent command exit status 1.
* 2022-05-15 19:57:15.652 Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).

cat /etc/sudoers:

root    ALL=(ALL:ALL) ALL
darwin  ALL=NOPASSWD:ALL
namjoo  ALL=NOPASSWD:ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
ubuntu sftp
  • 2 个回答
  • 1093 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve