diff --git a/django_remote_submission/wrapper/remote.py b/django_remote_submission/wrapper/remote.py index cf9ca73a0326428b06cd9515ae60810733d1d3d0..cc2bb532d82b6a3e13d1dd4d5b092cdb096edb23 100644 --- a/django_remote_submission/wrapper/remote.py +++ b/django_remote_submission/wrapper/remote.py @@ -43,6 +43,7 @@ class IdentityFile: :param persistent: unless set to `True, RSA files will be automatically deleted when the object is about to be garbage collected. """ + sshdir.mkdir(mode=700, parents=True, exist_ok=True) _, name = tempfile.mkstemp(prefix="id_rsa_", dir=sshdir) self._private = Path(name) self._public = Path(name + ".pub")