[Fwd: [rurban@x-ray.at: ssh-host-config CYGWIN quoting]]

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Dec 9 17:50:00 GMT 2004

[Still catching up on old mail]

> ----- Forwarded message from Reini Urban -----
> From: Reini Urban 
> To: cygwin 
> Subject: ssh-host-config CYGWIN quoting
> Date: Wed, 27 Oct 2004 02:37:04 +0200
> Hi Corinna,
> CYGWIN should be quoted when passed to cygrunsrv,
> otherwise one will not be able to use CYGWIN="server codepage:oem" as 
> sshd env. See the patch (but remove --interactive).

Hmm, I don't quite see where the current solution fails to do the right

$ cygrunsrv -I TESTsshd -p /usr/sbin/sshd -a -D -e "CYGWIN=tty binmode codepage:oem"
$ net start TESTsshd
The TESTsshd service is starting.
The TESTsshd service was started successfully.

$ ssh localhost
Last login: Thu Dec  9 18:35:30 2004 from [...]
$ echo $CYGWIN
tty binmode codepage:oem

> **********
> And then I have this service --interactive question:
> My favorite term is putty which allows compared to cmd.exe or rxvt.exe 
> better mouse selection of an over-long commandline. Also some more 
> goodies like signals, and visual bell.
> So I usually ssh to localhost, instead of open my cmd-bash.
> Therefore I had to add --interactive to sshd otherwise no GUI programs 
> like insight or setup will appear if started from my putty terms.
> Is it technically possible for sshd to detect if run as service and 
> forbid external connections somehow to use the desktop?
> Only allow local connections --interactive?
> Something like a new /etc/sshd_config setting:
> #Win32InteractiveLocalOnly
----- End forwarded message -----

That would be a generic change to OpenSSH and /etc/sshd_config.  I doubt
you'd get this approved by the upstream maintainers.  I see your point,
but that's nothing which belongs into OpenSSH.

Suggestion: Start two sshds, one on port 22 and non-interactive for 
external connections, one on port 2222 and interactive for local
connections.  This solves the problem w/o changing OpenSSH sources.


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/

More information about the Cygwin mailing list