darcs

Issue 1371 darcs assumes -p for SSH_PORT; but putty takes -P

Title darcs assumes -p for SSH_PORT; but putty takes -P
Priority bug Status needs-diagnosis/design
Milestone Resolved in
Superseder Nosy List darcs-devel, dixiecko, dmitry.kurochkin, eivuokko, jaredj, kirby, kowey, mae, thorkilnaur, wglozer
Assigned To dixiecko
Topics ProbablyEasy, SSH, Windows

Created on 2009-02-25.22:37:59 by mae, last changed 2013-02-05.21:09:13 by dixiecko.

Messages
msg7360 (view) Author: mae Date: 2009-02-25.22:37:55
This happens because darcs tries to use -p for port when putty only supports -
P. I have come up with a workaround for this issue, but it would be nice if 
this problem was fixed. Probably what needs to happen is that darcs needs to 
detect whether ssh is openssh or putty. This can be done with plink but not 
sure how to do this with putty. (putty doesn't support -V for version, plink 
does).

Please see this blog post for details:
http://blog.patch-tag.com/2009/02/25/how-to-get-around-firewalls-using-patch-tag
msg7428 (view) Author: kowey Date: 2009-03-11.14:04:44
Salvatore, would this be easy to fix?
msg8107 (view) Author: kowey Date: 2009-08-12.10:25:11
I think one easy implementation is to extend Darcs/Global.hs with ssh version
detection and then modify Ssh.hs so that getSSHOnly passes -p to ssh and -P to
putty/plink (Matthew: I thought plink *was* putty?).  

Note that we already pass different flags depending on whether we're calling ssh
(-p) and scp (-P).  So extending this logi in Ssh.getSSHOnly should not be too
difficult.

Note also that no knowledge of Darcs code is needed to work on this, just dive in.

I'd make either a type synonym or data type for SSH version info.  Maybe in the
future we'll be even fancier and keep track of state without using unsafePerformIO
msg11109 (view) Author: dixiecko Date: 2010-05-24.19:19:22
Here is early prototype (not in darcs yet):
 
https://patch-tag.com/r/dixiecko/detectSSH/snapshot/current/content/pretty/src/detectSSH.hs

Pending issues:
- error handling (interrupted blocked commands)
- detection for sftp/scp from ssh/plink
- testing on real environment (windows/linux, with ssh/plink)

and find the best way how to include that into Darcs/Globals.hs and use
that in Ssh.hs.

Is this right way how to solve -P/-p problem (challenge/response query
over command line) ?
msg11140 (view) Author: kowey Date: 2010-05-28.20:51:03
Discussion on
http://lists.osuosl.org/pipermail/darcs-users/2010-May/024081.html
History
Date User Action Args
2009-02-25 22:37:59maecreate
2009-02-27 14:19:16koweysettopic: + Windows, SSH
nosy: + wglozer, eivuokko, jaredj
2009-03-11 14:04:47koweysetstatus: unread -> unknown
nosy: + kirby
messages: + msg7428
2009-08-12 10:25:23koweysetstatus: unknown -> needs-implementation
nosy: kowey, wglozer, eivuokko, simon, thorkilnaur, jaredj, dmitry.kurochkin, kirby, mae
topic: + ProbablyEasy
messages: + msg8107
2009-08-25 17:41:20adminsetnosy: + darcs-devel, - simon
2009-08-27 14:23:31adminsetnosy: kowey, wglozer, darcs-devel, eivuokko, thorkilnaur, jaredj, dmitry.kurochkin, kirby, mae
2009-08-27 15:17:43koweysetnosy: kowey, wglozer, darcs-devel, eivuokko, thorkilnaur, jaredj, dmitry.kurochkin, kirby, mae
title: SSH_PORT is broken on Windows if your using Putty -> darcs assumes -p for SSH_PORT; but putty takes -P
2009-08-27 15:44:04koweylinkissue504 superseder
2010-05-24 19:19:23dixieckosetstatus: needs-implementation -> has-patch
assignedto: dixiecko
messages: + msg11109
nosy: + dixiecko
2010-05-28 20:51:04koweysetmessages: + msg11140
2010-05-29 11:47:55dixieckolinkpatch254 issues
2013-02-05 21:09:13dixieckosetstatus: has-patch -> needs-diagnosis/design