[2025-jun-17] The SlackDocs mailing lists at https://lists.alienbase.nl/mailman/listinfo have been retired. No one has been using these lists for years and it's time to say goodbye. The list archives remain available at https://scalzi.slackware.nl/mailman/listinfo/slackdocs

[2025-jun-17] The SlackDocs Wiki has moved to a new server, in order to make it more performant.

Welcome to the Slackware Documentation Project

Connection closed message when using scp among various releases of Slackware Linux

If your scp fails with a Connection closed message, then add a -v to your options,

scp -p -v myfile.txt user@host:/home/user/Downloads/

to see if you get something like the following:

debug1: Sending subsystem: sftp
debug1: client_global_hostkeys_private_confirm: server used untrusted RSA signature algorithm ssh-rsa for key 0, disregarding
debug1: update_known_hosts: known hosts file /home/xmas/.ssh/known_hosts2 does not exist
Connection closed

If you see the Sending subsystem: sftp message, then there is a discrepancy between your versions of ssh. Until you get them all up to the same level, where they are using sftp, add -O (dash Oh) to your scp options to override and use the old way of transfer. You can find more information on -O in your system's man pages.

     -O      Use the original SCP protocol for file transfers instead of the
             SFTP protocol.  Forcing the use of the SCP protocol may be neces-
             sary for servers that do not implement SFTP, for backwards-com-
             patibility for particular filename wildcard patterns and for ex-
             panding paths with a '~' prefix for older SFTP servers.  This
             mode is the default.

Sources

QR Code
QR Code wiki:user:xmassecond (generated for current page)