diff --git a/tes/sshwrapper/__init__.py b/tes/sshwrapper/__init__.py
index 11abeb1dfd47eed0fef440aff217213569807081..6093fb6c8dbd12f9b1d3b476bd9d8f276b85046e 100644
--- a/tes/sshwrapper/__init__.py
+++ b/tes/sshwrapper/__init__.py
@@ -423,7 +423,7 @@ class Ssh:
                 batchhost=batchhost)
             sshcmd = Ssh.SSHCMDWITHOPTS.copy()
             sshcmd.extend([
-                      '-o', "ProxyCommand={}".format(proxycmd),
+                '-o', "ProxyCommand=\"{}\"".format(proxycmd),
                       '-L', '{localport}:localhost:{port}'.
                       format(port=port, localport=localport),
                       '-p', sshport, '-l', user, batchhost])