Skip to content

Commit 3f35188

Browse files
committed
Prevent ssh from touching ~/.ssh.
This drastically improves the speed of hostbased ssh because ~/.ssh is typically not readable/writable by scripts accounts.
1 parent f5b239d commit 3f35188

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/common/oursrc/accountadm/mbash.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,14 @@ def maybe_forward():
112112
print("%s - ssh %s" % (vhost, name), file=sys.stderr)
113113
print(file=sys.stderr)
114114
if forward:
115-
args = ['ssh', main_pool, '--']
115+
args = [
116+
'ssh',
117+
'-F', '/etc/ssh/ssh_config',
118+
'-o', 'IdentityFile=none',
119+
'-o', 'UserKnownHostsFile=none',
120+
main_pool,
121+
'--',
122+
]
116123
if command is not None:
117124
args.append(command)
118125
os.execv('/usr/bin/ssh', args)

0 commit comments

Comments
 (0)