Found out in logs on the server that SFTP subsystem can not be found.
# journalctl -f
Jan 24 16:45:43 mysrv sshd[2045]: subsystem request for sftp by user XXX failed, subsystem not found
Don't know how it was disabled, but re-enabling it in config solved the issue.
Just uncomment one line..
# nano /etc/ssh/sshd_config
Subsystem sftp /usr/lib/openssh/sftp-server
Don't forget to restart the SSHd.
# systemctl restart ssh
Just for search engine bots - here is the successfull SCP log:
Authenticated to mysrv ([88.88.111.11]:22) using "publickey".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
...
debug1: Sending subsystem: sftp
debug1: pledge: fork
scp: debug1: Fetching /home/XXX/dir/app.rb to app.rb.bak
app.rb 100% 38KB 297.3KB/s 00:00
scp: debug1: truncating at 39240
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3248, received 42336 bytes, in 1.3 seconds
Bytes per second: sent 2528.5, received 32958.1
debug1: Exit status 0
scpuses from SCP to SFTP. I mean yourscpused to use SCP and it worked ("I am sure I was SCPing some files TO the server before") and now it uses SFTP, so only now theSubsystem sftpconfig of the server matters for yourscp. Please see "History, SCP and SFTP" in this answer. – Kamil Maciorowski Jan 24 '24 at 16:28-0:) – A.D. Jan 24 '24 at 17:05