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


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

ssh-host-config CYGWIN quoting


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).


**********

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


If you give me a rough outline I can implement it by my own also.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
--- /bin/ssh-host-config~	2004-09-22 18:25:53.001000000 +0100
+++ /bin/ssh-host-config	2004-10-27 01:20:27.615124800 +0100
@@ -553,14 +553,14 @@
       [ -z "${_cygwin}" ] && _cygwin="ntsec"
       if [ $_nt2003 -gt 0 -a "${sshd_server_in_sam}" = "yes" ]
       then
-	if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -u sshd_server -w "${_password}" -e "CYGWIN=${_cygwin}"
+	if cygrunsrv -I sshd --interactive -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -u sshd_server -w "${_password}" -e "CYGWIN=\"${_cygwin}\""
 	then
 	  echo
 	  echo "The service has been installed under sshd_server account."
 	  echo "To start the service, call \`net start sshd' or \`cygrunsrv -S sshd'."
 	fi
       else
-	if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}"
+	if cygrunsrv -I sshd --interactive -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=\"${_cygwin}\""
 	then
 	  echo
 	  echo "The service has been installed under LocalSystem account."

--
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: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]