Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.security.ssh > #15054
| Newsgroups | comp.security.ssh |
|---|---|
| Date | 2024-02-13 21:45 -0800 |
| Message-ID | <cb91d831-1d0b-4331-82d9-a8c8d6d5e3a2n@googlegroups.com> (permalink) |
| Subject | Error output may not be obtained when executing a command with plink |
| From | ozawa01 jins <jinsozawa01@gmail.com> |
Hello, For example, when you specify a path that does not exist with the ls command, plink will terminate without displaying the error output until the end. Also, at this time, plink's exit code is returned as 0. It doesn't always happen, but it has a high probability. For details, please check the 「■Log when occurs」and「■Log when it does not occur」 below. This problem seems to occur from plink version 0.77 or later. It doesn't happen in 0.76. Has anyone encountered the same phenomenon? Thanks. ■plink version plink: Release 0.80 Build platform: 64-bit x86 Windows Compiler: clang 14.0.0 , emulating Visual Studio 2022 (17.2), _MSC_VER=1932, _MSC_FULL_VER=193231329 Source commit: c96fb0f10a4266513f8ebd3781550dac387d1dd1 ■Running OS version Windows Server 2019 Standard ■Connecting protocol SSH ■Connecting server I tried the following two types ・Red Hat Enterprise Linux release 8.1 (Ootpa) ・Red Hat Enterprise Linux release 9.1 (Plow) ■Log when occurs D:\work\putty>plink.exe root@xxx.xxx.xxx.xxx -pw "xxxxx" -P 22 -v -no-antispoof "ls NotExistsDierectory" Looking up host "xxx.xxx.xxx.xxx" for SSH connection Connecting to xxx.xxx.xxx.xxx port 22 We claim version: SSH-2.0-PuTTY_Release_0.80 Connected to xxx.xxx.xxx.xxx Remote version: SSH-2.0-OpenSSH_8.7 Using SSH protocol version 2 No GSSAPI security context available Doing ECDH key exchange with curve Curve25519, using hash SHA-256 (unaccelerated) Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256 host keys, but we don't know any of them Host key fingerprint is: ssh-ed25519 255 SHA256:wcNJXRAyMFZZHBaDsju5qovDY4VnvbJhqTFKZPHSFlI The host key is not cached for this server: xxx.xxx.xxx.xxx (port 22) You have no guarantee that the server is the computer you think it is. The server's ssh-ed25519 key fingerprint is: ssh-ed25519 255 SHA256:wcNJXRAyMFZZHBaDsju5qovDY4VnvbJhqTFKZPHSFlI If you trust this host, enter "y" to add the key to Plink's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n, Return cancels connection, i for more info) n Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption Initialised HMAC-SHA-256 (unaccelerated) outbound MAC algorithm Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption Initialised HMAC-SHA-256 (unaccelerated) inbound MAC algorithm Using username "root". Using SSPI from SECUR32.DLL Trying gssapi-with-mic... Attempting GSSAPI authentication GSSAPI authentication request refused Sent password Access granted Opening main session channel Opened main channel Started a shell/command ls: c D:\work\putty>echo %errorlevel% 0 ■Log when it does not occur D:\work\putty>plink.exe root@xxx.xxx.xxx.xxx -pw xxxxx -P 22 -v -no-antispoof "Is Not ExistsDierectory" Looking up host "xxx.xxx.xxx.xxx" for SSH connection Connecting to xxx.xxx.xxx.xxx port 22 Connected to xxx.xxx.xxx.xxx We claim version: SSH-2.0-PuTTY_Release_0.80 Remote version: SSH-2.0-OpenSSH_8.7 Using SSH protocol version 2 No GSSAPI security context available Doing ECDH key exchange with curve Curve25519, using hash SHA-256 (unaccelerated) Server also has ecdsa-sha2-nistp256/rsa-sha2-512/rsa-sha2-256 host keys, but we don't know any of them Host key fingerprint is: ssh-ed25519 255 SHA256:wcNJXRAyMFZZHBaDsju5qovDY4VnvbJhqTFKZPHSFlI The host key is not cached for this server: xxx.xxx.xxx.xxx (port 22) You have no guarantee that the server is the computer you think it is. The server's ssh-ed25519 key fingerprint is: ssh-ed25519 255 SHA256:wcNJXRAyMFZZHBaDsju5qovDY4VnvbJhqTFKZPHSFlI If you trust this host, enter "y" to add the key to Plink's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n, Return cancels connection, i for more info) n Initialised AES-256 SDCTR (AES-NI accelerated) outbound encryption Initialised HMAC-SHA-256 (unaccelerated) outbound MAC algorithm Initialised AES-256 SDCTR (AES-NI accelerated) inbound encryption Initialised HMAC-SHA-256 (unaccelerated) inbound MAC algorithm Using username "root". Using SSPI from SECUR32.DLL Trying gssapi-with-mic... Attempting GSSAPI authentication GSSAPI authentication request refused Sent password Access granted Opening main session channel Opened main channel Started a shell/command ls: cannot access 'NotExistsDierectory': No such file or directory Session sent command exit status 2 D:\work\putty>echo %errorlevel% 2
Back to comp.security.ssh | Previous | Next — Next in thread | Find similar
Error output may not be obtained when executing a command with plink ozawa01 jins <jinsozawa01@gmail.com> - 2024-02-13 21:45 -0800 Re: Error output may not be obtained when executing a command with plink ozawa01 jins <jinsozawa01@gmail.com> - 2024-02-18 21:47 -0800
csiph-web