aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Ssh.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-14 16:45:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-14 16:45:39 -0400
commit07ab0b85ce375c1882e13780e525aba8918c6fdf (patch)
treea25a09ae638fa0baa9c0e9b841644412e21d6be1 /Assistant/Ssh.hs
parent619f66cffe02d30954bec109e90b0ff88f0581fa (diff)
work around what is likely a bug in a new version of ssh
This avoids running into it for new setups, but does not transition old setups. Just a quick fix; I hope to get ssh fixed.
Diffstat (limited to 'Assistant/Ssh.hs')
-rw-r--r--Assistant/Ssh.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs
index 82da9e33a..fdb56f08b 100644
--- a/Assistant/Ssh.hs
+++ b/Assistant/Ssh.hs
@@ -315,10 +315,14 @@ setSshConfig sshdata config = do
- to allow unMangleSshHostName to work. Any unusual characters in the
- username or directory are url encoded, except using "." rather than "%"
- (the latter has special meaning to ssh).
+ -
+ - The mangled hostname is lower-cased because openssh 6.5p1 does not work
+ - if ssh config Host lines contain any upper-case.
-}
mangleSshHostName :: SshData -> String
-mangleSshHostName sshdata = "git-annex-" ++ T.unpack (sshHostName sshdata)
- ++ "-" ++ escape extra
+mangleSshHostName sshdata = map toLower $
+ "git-annex-" ++ T.unpack (sshHostName sshdata)
+ ++ "-" ++ escape extra
where
extra = intercalate "_" $ map T.unpack $ catMaybes
[ sshUserName sshdata