Bug 777 - sftp can't be used with s/key names on OpenBSD
Summary: sftp can't be used with s/key names on OpenBSD
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp (show other bugs)
Version: -current
Hardware: All All
: P2 major
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks: 793
  Show dependency treegraph
 
Reported: 2003-12-19 21:32 AEDT by Andrew Mortensen
Modified: 2004-04-14 12:24 AEST (History)
1 user (show)

See Also:


Attachments
Moves colon parsing after user name and host have been determined. (639 bytes, patch)
2003-12-19 21:57 AEDT, Andrew Mortensen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mortensen 2003-12-19 21:32:57 AEDT
In sftp.c, the code searches for a colon in the userhost string before parsing
out the host and the user name. The colon should separate the host from the file
to be retrieved, if specified, but because the colon is looked for first, and is
replaced with a NUL, everything before the colon is interpreted to be the
hostname. So:

sftp user:skey@host.com

is recognized as:

sftp user and download a file called "skey@host.com"

which typically results in a "No address associated with nodename" error.

The attached patch places the colon parsing after the user and host name have
been gathered, allowing skey names to work when connecting with sftp.
Comment 1 Andrew Mortensen 2003-12-19 21:57:18 AEDT
Created attachment 516 [details]
Moves colon parsing after user name and host have been determined.
Comment 2 Andrew Mortensen 2003-12-31 09:13:27 AEDT
Added CC
Comment 3 Andrew Mortensen 2004-01-07 11:38:45 AEDT
Updated summary
Comment 4 Damien Miller 2004-01-22 21:01:34 AEDT
I'm looking at this
Comment 5 Damien Miller 2004-01-27 03:06:01 AEDT
fix applied, thanks.
Comment 6 Damien Miller 2004-04-14 12:24:20 AEST
Mass change of RESOLVED bugs to CLOSED