r/linuxadmin • • 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

10 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/BinaryGrind Jan 22 '26

Why not just use multiple keys? If you've got one key set specifically for use with rsync, why can't you have one for using SSH normally?

1

u/sdns575 Jan 22 '26

Hi and thank you for your answer. Probably I will use multiple keys