r/linuxadmin • u/sdns575 • Jan 22 '26
rsync --server question
Hi,
I need to sync file between two hosts with rsync+ssh using private key. After key sharing I restrict the key to only one command: "/usr/bin/rsync --server -slHDtprze.iLsfxCIvu". It works, but I've a problem. If I try to connect to the host using the specified key but not using rsync it will hangs forever. There is a way to specifity to rsync a timeout when using --server or something similar?
Thank you in advance
11
Upvotes
View all comments
Show parent comment
2
u/meditonsin Jan 22 '26
If a public key has a force command set, you can not use it for anything else. It will only ever call the force command, no matter what you do on the client side.