1

I have the following line in sshd_config to make a transcript of every session:

ForceCommand script -q "/transcripts/test_transcript" -c "{SSH_ORIGINAL_COMMAND:=bash}"

SSH works as expected but when I try to SCP, it hangs at this point:

$ scp -v user@localhost:~/test .

Lots of debug lines describing key exchange and auth

debug1: Sending command: scp -v -f ~/test

If I remove the line with ForceCommand from sshd_config, SCP works fine.

I assume this is not an uncommon pattern for making session transcripts and tried searching for a solution to this problem. As you can imagine it can be hard to find links that mention script, the utility to make a typescript of a terminal session from util-linux package, and not some other script.

anx
  • 10,888

0 Answers0