Closed
Description
To reproduce:
colin at coder in /tmp/tmp.1mb8ndcSGY
$ touch test.txt
colin at coder in /tmp/tmp.1mb8ndcSGY
$ scp test.txt coder.coolin:
test.txt 100% 0 0.0KB/s 00:00
colin at coder in /tmp/tmp.1mb8ndcSGY
$ echo $?
1
Debug
$ scp -v test.txt coder.coolin:
Executing: program /nix/store/0f1agkdv114rpvvr8j8vgsnn5pqrqijz-openssh-9.6p1/bin/ssh host coder.coolin, user (unspecified), command sftp
OpenSSH_9.6p1, OpenSSL 3.0.12 24 Oct 2023
debug1: Reading configuration data /home/colin/.ssh/config
debug1: /home/colin/.ssh/config line 29: Applying options for coder.coolin
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 5: Applying options for *
debug1: Executing proxy command: exec /home/colin/go/bin/coder --global-config /home/colin/.config/coderv2 ssh --stdio coolin
debug1: identity file /home/colin/.ssh/id_rsa type 0
debug1: identity file /home/colin/.ssh/id_rsa-cert type -1
debug1: identity file /home/colin/.ssh/id_ecdsa type -1
debug1: identity file /home/colin/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/colin/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/colin/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/colin/.ssh/id_ed25519 type 3
debug1: identity file /home/colin/.ssh/id_ed25519-cert type -1
debug1: identity file /home/colin/.ssh/id_ed25519_sk type -1
debug1: identity file /home/colin/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/colin/.ssh/id_xmss type -1
debug1: identity file /home/colin/.ssh/id_xmss-cert type -1
debug1: identity file /home/colin/.ssh/id_dsa type -1
debug1: identity file /home/colin/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6
debug1: Remote protocol version 2.0, remote software version Go
debug1: compat_banner: no match: Go
debug1: Authenticating to coder.coolin:22 as 'colin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-rsa SHA256:rOlYkHnSNpwlG7wdQv/d8oW6sRvJq6Smh/Vo7d5ntUw
Warning: Permanently added 'coder.coolin' (RSA) to the list of known hosts.
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss>
debug1: kex_ext_info_check_ver: ping@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
Authenticated to coder.coolin (via proxy) using "none".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Entering interactive session.
debug1: pledge: proc
debug1: Sending subsystem: sftp
debug1: pledge: fork
test.txt 100% 0 0.0KB/s 00:00
scp: debug1: truncating at 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2040, received 2088 bytes, in 0.5 seconds
Bytes per second: sent 3930.4, received 4022.8
debug1: Exit status 1
It seems like running scp with -O
fixes the issue, implying the issue is with out SFTP implementation.
colin at coder in /tmp/tmp.1mb8ndcSGY
$ scp -O test.txt coder.coolin:
test.txt 100% 0 0.0KB/s 00:00
colin at coder in /tmp/tmp.1mb8ndcSGY
$ echo $?
0
Metadata
Metadata
Assignees
Labels
No labels