diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-05 13:53:21 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-05 13:53:21 -0400 |
commit | 2934787af840e5c14eea447ae2ec41dbfc3a1be5 (patch) | |
tree | 9aff22823c989178dcf8382ae60d5f8f9253f3f4 /Assistant/Ssh.hs | |
parent | 96c5546cea61543ac115bc9b48a26e51fa96f030 (diff) |
webapp: Include no-pty in ssh authorized_keys lines.
git-annex-shell does not need a pty, so this speeds things up.
Also, it may avoid weird misconfigured systems that try to run screen or
tmux on every ssh login from doing so.
Diffstat (limited to 'Assistant/Ssh.hs')
-rw-r--r-- | Assistant/Ssh.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Assistant/Ssh.hs b/Assistant/Ssh.hs index 82da9e33a..acb2fc11c 100644 --- a/Assistant/Ssh.hs +++ b/Assistant/Ssh.hs @@ -143,6 +143,8 @@ addAuthorizedKeys :: Bool -> FilePath -> SshPubKey -> IO Bool addAuthorizedKeys gitannexshellonly dir pubkey = boolSystem "sh" [ Param "-c" , Param $ addAuthorizedKeysCommand gitannexshellonly dir pubkey ] +{- Should only be used within the same process that added the line; + - the layout of the line is not kepy stable across versions. -} removeAuthorizedKeys :: Bool -> FilePath -> SshPubKey -> IO () removeAuthorizedKeys gitannexshellonly dir pubkey = do let keyline = authorizedKeysLine gitannexshellonly dir pubkey @@ -195,7 +197,7 @@ authorizedKeysLine gitannexshellonly dir pubkey - long perl script. -} | otherwise = pubkey where - limitcommand = "command=\"GIT_ANNEX_SHELL_DIRECTORY="++shellEscape dir++" ~/.ssh/git-annex-shell\",no-agent-forwarding,no-port-forwarding,no-X11-forwarding " + limitcommand = "command=\"GIT_ANNEX_SHELL_DIRECTORY="++shellEscape dir++" ~/.ssh/git-annex-shell\",no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-pty " {- Generates a ssh key pair. -} genSshKeyPair :: IO SshKeyPair |