This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next] [Raw text]

# Re: michael's openssh for windows

"I have to say that this list does not provide support for truncated versions of Cygwin downloaded from other sites"
Let's just say that I was using the normal installation ;)
Yes, I came in to this discussion because I knew the procedure would be very similar if not the same. Someday I may want to get the full cygwin distribution, but for now, I only need the necessities.

I hope this will help for future users who want to use ssh solely as an sftp server.

I also want people to know of the HUGE advantage of using a sftp over a normal ftp server: even though it is slower, it only uses ONE port. This means those of you behind a linksys router or whatever can forward a single port and it will work! (no "higher" pasv mode ports.)
For example: a situation where this may come in handy is if you are at work and all outgoing ports are blocked except, say, 80 and you need to transfer files from/to home.

Happy cygwining.

Cheers,
Johnny

Igor Pechtchanski wrote:

Now that I finally realized which "Michael" you were talking about in the
subject, I have to say that this list does not provide support for
Erdely's openssh installation.  However, the instructions would be the
same for the official Cygwin version of openssh, so it's good that this
discussion is in the archives.
Igor
P.S. FYI, to avoid the "Could not chdir to home directory /home/SSHUSER:
No such file or directory" message, edit your /etc/passwd and change
"/home/SSHUSER" to "/cygdrive/d/ssh_shared" (again, works on Cygwin, too)

On Wed, 13 Aug 2003, jwaterbrook wrote:

> I played with this a bit last night and chatted with a few friends and I
> think I found my solution.
>
> I created a directory on the my "D Drive" and called it SSH_SHARED (ie
> d:\ssh_shared)
> I copied these files to it:
> c:\program files\openssh\bin\cygcrypto-0.9.7.dll to
> d:\ssh_shared\bin\cygcrypto-0.9.7.dll
> c:\program files\openssh\bin\cygwin1.dll to d:\ssh_shared\bin\cygwin1.dll
> c:\program files\openssh\bin\sh.exe to d:\ssh_shared\bin\sh.exe
> c:\program files\openssh\etc\moduli to d:\ssh_shared\etc\moduli
> c:\program files\openssh\usr\sbin\sftp-server.exe to
> d:\ssh_shared\usr\sbin\sftp-server.exe
> and created a directory called d:\ssh_shared\pub\ (where I'll put the files)
>
> at the end of my sftponly script I added the line:
> chroot /cygdrive/d/ssh_shared /bin/sh -i "\$@"
> (in place of the exec /bin/sh)
>
> (keep in mind I am using michaels openssh distribution so it's not included)
> and put it into c:\program files\openssh\bin
>
> then I restarted the service.
>
> when I ssh into the machine here is my output:
> Last login: Wed Aug 13 11:53:32 2003 from wwww.xxxx.com
> Could not chdir to home directory /home/SSHUSER: No such file or directory
> Sorry, sftp only!
> Connection to yyyy.zzzz.net closed.
> USER@localhost:~\$
>
> when I sftp into the machine, it is sucessful.
> When I try a cd /cygdrive/c/windows I get:
> sftp> cd /cygdrive/d/windows
> Couldn't canonicalise: No such file or directory
> sftp>
>
> When I try a cd .. I get the same thing.
>
> I'm not very impressed with the transfer rates that I'm getting, but it
> may be the encryption overhead. It would also be nice to package this
> someday as an alternative to the many windows' ftp servers out there.
>
> Thanks to everyone who helped me out on this.
> Johnny
>
> Igor Pechtchanski wrote:
>
> > Glad I could help. chroot is tricky to set up, you might want to
> > search the net for some working examples. DENY ACLs are a feature of
> > WinNT-based systems (Win2k, WinXP, etc) -- they are not a feature of
> > Cygwin proper.
> > Igor
> [snip]

--
http://cs.nyu.edu/~pechtcha/ <http://cs.nyu.edu/%7Epechtcha/>
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next]