[clug] scp

Eyal Lebedinsky eyal at eyal.emu.id.au
Thu Sep 7 09:35:02 UTC 2017


On 07/09/17 18:48, Bryan Kilgallin (iiNet) via linux wrote:
> I'm trying, Eyal:
> 
>> Show the commands you ran, and the errors/failures you experienced.
> 
>  From the desktop PC's user directory.
> 
> {
> scp -v Test.txt me at laptop:~/

If I am a real paranoid (is this really a tilde?) then I would try
$ scp -v Test.txt me at laptop

> ...
> OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: /etc/ssh/ssh_config line 19: Applying options for *
> ...
> debug1: Connection established.
> ...
> debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
> debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
> debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000
> ...
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug1: kex: algorithm: curve25519-sha256 at libssh.org
> debug1: kex: host key algorithm: ecdsa-sha2-nistp256
> debug1: kex: server->client cipher: chacha20-poly1305 at openssh.com MAC: <implicit> compression: none
> debug1: kex: client->server cipher: chacha20-poly1305 at openssh.com MAC: <implicit> compression: none
> debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> ...
> debug1: rekey after 134217728 blocks
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug1: rekey after 134217728 blocks
> debug1: SSH2_MSG_NEWKEYS received
> debug1: SSH2_MSG_EXT_INFO received
> debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug1: Authentications that can continue: publickey,password
> debug1: Next authentication method: publickey
> ...
> debug1: Next authentication method: password
> ...
> debug1: Authentication succeeded (password).
> ...
> debug1: channel 0: new [client-session]
> debug1: Requesting no-more-sessions at openssh.com
> debug1: Entering interactive session.
> debug1: pledge: network
> debug1: client_input_global_request: rtype hostkeys-00 at openssh.com want_reply 0
> debug1: Sending environment.
> debug1: Sending env LANG = en_AU.UTF-8
> debug1: Sending env LC_ADDRESS = en_AU.UTF-8
> debug1: Sending env LC_IDENTIFICATION = en_AU.UTF-8
> debug1: Sending env LC_MEASUREMENT = en_AU.UTF-8
> debug1: Sending env LC_MONETARY = en_AU.UTF-8
> debug1: Sending env LC_NAME = en_AU.UTF-8
> debug1: Sending env LC_NUMERIC = en_AU.UTF-8
> debug1: Sending env LC_PAPER = en_AU.UTF-8
> debug1: Sending env LC_TELEPHONE = en_AU.UTF-8
> debug1: Sending env LC_TIME = en_AU.UTF-8
> debug1: Sending command: scp -v -t ~/

When I run this command, the next messages (which you removed?) are the important ones:
Sending file modes: C0664 14037 Test.txt
Sink: C0664 14037 Test.txt
Test.txt                                                                                                                                                                       100%   14KB  13.0MB/s   00:00
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

> ...
> debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
> debug1: channel 0: free: client-session, nchannels 1
> debug1: fd 0 clearing O_NONBLOCK
> debug1: fd 1 clearing O_NONBLOCK
> Transferred: sent 2400, received 2616 bytes, in 0.2 seconds
> Bytes per second: sent 12374.9, received 13488.6
> debug1: Exit status 0
> }
> 
> The terminal returns to desktop user prompt. But on the laptop there's no sign of that 15-byte test file!

Are you sure that on the laptop you are logged in as user 'me'? Try
$ ssh me at laptop ls -ltr

-- 
Eyal Lebedinsky (eyal at eyal.emu.id.au)



More information about the linux mailing list