Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <417EEDB0.7090405@x-ray.at> Date: Wed, 27 Oct 2004 02:37:04 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a3) Gecko/20040817 MIME-Version: 1.0 To: cygwin Subject: ssh-host-config CYGWIN quoting Content-Type: multipart/mixed; boundary="------------090201080703080609020604" X-IsSubscribed: yes --------------090201080703080609020604 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit 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/ --------------090201080703080609020604 Content-Type: text/plain; name="ssh-quot.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ssh-quot.patch" --- /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." --------------090201080703080609020604 Content-Type: text/plain; charset=us-ascii -- 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/ --------------090201080703080609020604--