Bug 777

Summary: sftp can't be used with s/key names on OpenBSD
Product: Portable OpenSSH Reporter: Andrew Mortensen <admorten>
Component: sftpAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: major CC: openssh-bugs
Priority: P2    
Version: -current   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 793    
Attachments:
Description Flags
Moves colon parsing after user name and host have been determined. none

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