ssh-upload: prevent buffer overrun