bugzilla-daemon at mindrot.org
2003-Oct-12 02:57 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 mouring at eviladmin.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Summary|sftp doesn't honor "Protocol|Allow sftp to read config |1" in config file |file to honor "Protocol 1" ------- Additional Comments From mouring at eviladmin.org 2003-10-12 12:57 ------- You are correct. sftp directly does a 'addargs(&args, "-oProtocol %d", sshvar)' where sshvar is *ALWAYS* a value of 2 unless you use -1 as a commandline argument. Since sftp never parses the .ssh/config nor ssh_config directly it has no clue that you want to default to protocol 1. Only the underlying ssh connection reads those files (same with scp). Since sftp uses a 'subsystem' and was created for protocol 2.. The -1 support is really a hack to allow it to work. As a result, I think I'm going to tag this as 'Enhancement'. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 03:06 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From dtucker at zip.com.au 2003-10-12 13:06 ------- Created an attachment (id=483) --> (http://bugzilla.mindrot.org/attachment.cgi?id=483&action=view) Don't set "-oProtocol" in sftp.c except for SSHv1 I suspect that the forcing of protocol 2 dates back to when ssh(1) defaulted to Protocol 1. Since ssh now defaults to Protocol 2, we could change sftp.c to only add -oProtocol for the "-1" option, like so and let ssh figure it out otherwise. Perhaps sftp needs a "-2" option to correspond to "-1"? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 03:12 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From dtucker at zip.com.au 2003-10-12 13:12 ------- Er, please ignore the second part (changes to regress/banner.sh) in patch id #483. It's harmless but it's not related to this bug. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 03:18 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #483 is|0 |1 obsolete| | ------- Additional Comments From dtucker at zip.com.au 2003-10-12 13:18 ------- (From update of attachment 483) On second thought, ignore the whole patch, it's just wrong (thanks bal). ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 03:58 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From mouring at eviladmin.org 2003-10-12 13:58 ------- Created an attachment (id=484) --> (http://bugzilla.mindrot.org/attachment.cgi?id=484&action=view) Rough quicky patch This is an extremely rough and quick patch that allows it. Some code should be moved around to make a better version, but this will give an idea on what is involved. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 04:01 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From mouring at eviladmin.org 2003-10-12 14:01 ------- BTW you do need to modify the makefile to change the 'sftp' target to ass in 'readconf.o' (or readconf.c for OpenBSD). The patch is against OpenBSD tree, but should hopefully apply clean on portable. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 04:04 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 mouring at eviladmin.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 09:33 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From djm at mindrot.org 2003-10-12 19:33 ------- sftp should default to protocol 2, as the draft-ietf-secsh-filexfer (sftp) protocol is not specified for protocol v.1. It will only work against OpenSSH servers. Even egainst these it is not likely to be completely reliable as the client has to launch sftp-server by pathname. I agree that the current behaviour is confusing, but changing it may break many working setups. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 10:16 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From markus at openbsd.org 2003-10-12 20:16 ------- i don't think that sftp should ever read the ssh config file. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-12 14:20 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 ------- Additional Comments From cduffy at spamcop.net 2003-10-13 00:20 ------- Markus: Why not? From an end-user perspective, it's quite counterintuitive; there've been at least three independant arch/tla users who've noticed that behaviour and found it suprising. Do you propose a separate sftp config file? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-Oct-27 00:37 UTC
[Bug 742] Allow sftp to read config file to honor "Protocol 1"
http://bugzilla.mindrot.org/show_bug.cgi?id=742 mouring at eviladmin.org changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.6.1p2 |-current ------- Additional Comments From mouring at eviladmin.org 2003-10-27 11:37 ------- The problem is as such: Protocol 1 Protocol 2 work fine if you read the .config or ssh_config with the attached patch, but if you do: Protocol 1,2 and the server only supports Protocol 2 it will fail because the sftp client can't change gears once it starts the ssh session. The only good way of handling this would be to teach -s option to support it's own name space. IE: ssh -s sftp site.com /path/to/sftp-server That would allow ssh to pick a protocol and attach to it correctly, and allow sftp to be blissfully ignorant of the underlying protocol. But I don't see that happening in the future since sftp over protocol 1 is pretty much a hack and unless the client knows the extact location of sftp- server or the sftp-server is in the path and the client does not /set/the/starting/path/. It will fail giving even odder error messages (see the whole 'scp not in path' threads on openssh-unix-dev@ mailinglist). ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.