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: From: Steve Fairbairn To: "'cygwin AT cygwin DOT com'" Subject: RE: sshd as service without /usr/bin being in the system path. Date: Wed, 14 May 2003 11:03:09 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C31A00.05AAAEE0" ------_=_NextPart_000_01C31A00.05AAAEE0 Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu] > Sent: 13 May 2003 16:10 > To: Steve Fairbairn > > Steve, > > You can specify the path in cygrunsrv's -e option... > However, note the > marked lines from "cygrunsrv --help": > > -e, --env Optional environment strings > which are added > to the environment when service > is started. > You can add up to 255 environment > strings using > the `--env' option. > ---> Note: /bin is always added to > $PATH to allow all > ---> started applications to find at > least cygwin1.dll. > > so it looks like you don't even need to do that (/bin and > /usr/bin are the > same under Cygwin). > Igor Thanks Igor, I should've spotted this given the fact that the ssh-host-config script uses -e when it installs the service. I have another issue with my sshd service and I can't find anything like it in the archives. The service is installed fine. I can go to it in services and stop and start it perfectly. Once I've started it, I can ssh to the server from my machine with no problems (I am ssh'ing to the same user the server is actually logged in as. I only ever use that one user on the server running sshd). The service is set to start automatically, and if I reboot the server and go to servics in control panel, it's all there started fine. If I try and connect to it however, the connection is made and I get the prompt for the users password, but the password is always incorrect. If I use control panel->services to stop and start the service again, then I am able to login. I have no idea what is different between the service running from boot, and the service stopped and started by the logged in user. I have attached ssh -v logs from both a failed connection and a successful one. If anyone has any suggestions, I'd be most grateful. Thanks, Steve. -- -- LONG DISCLAIMER -- ******************************************************* This email has originated from Perwill plc (Registration No. 1906964) Office registered at: 13A Market Square, Alton, Hampshire, GU34 1UR, UK Tel: +44 (0)1420 545000 Fax: +44 (0)1420 545001 www.perwill.com ******************************************************* Privileged, confidential and/or copyright information may be contained in this email, and is only for the use of the intended addressee. To copy, forward, disclose or otherwise use it in any way if you are not the intended recipient or responsible for delivering to him/her is prohibited. If you receive this email by mistake, please advise the sender immediately, by using the reply facility in your email software. We may monitor the content of emails sent and received via our network for the purposes of ensuring compliance with policies and procedures. This message is subject to and does not create or vary any contractual relationships between Perwill plc and the recipient. ******************************************************* Any opinions expressed in the email are those of the sender and not necessarily of Perwill plc. ******************************************************* This email has been scanned for known viruses using McAfee WebShield 4.5 MR1a ******************************************************* ------_=_NextPart_000_01C31A00.05AAAEE0 Content-Type: text/plain; name="ssh-succeed.txt" Content-Disposition: attachment; filename="ssh-succeed.txt" Steve Fairbairn AT steve_fairbairn ~ $ ssh -v Dev AT devtestw2k OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090608f debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: ssh_connect: needpriv 0 debug1: Connecting to devtestw2k [192.168.101.6] port 22. debug1: Connection established. debug1: identity file /home/Steve Fairbairn/.ssh/identity type -1 debug1: identity file /home/Steve Fairbairn/.ssh/id_rsa type -1 debug1: identity file /home/Steve Fairbairn/.ssh/id_dsa type 2 debug1: Remote protocol version 1.99, remote software version OpenSSH_3.6.1p1 debug1: match: OpenSSH_3.6.1p1 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_3.5p1 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: dh_gen_key: priv key bits set: 133/256 debug1: bits set: 1628/3191 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'devtestw2k' is known and matches the RSA host key. debug1: Found key in /home/Steve Fairbairn/.ssh/known_hosts:7 debug1: bits set: 1574/3191 debug1: ssh_rsa_verify: signature correct debug1: kex_derive_keys debug1: newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: waiting for SSH2_MSG_NEWKEYS debug1: newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: done: ssh_kex2. debug1: send SSH2_MSG_SERVICE_REQUEST debug1: service_accept: ssh-userauth debug1: got SSH2_MSG_SERVICE_ACCEPT debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: next auth method to try is publickey debug1: try privkey: /home/Steve Fairbairn/.ssh/identity debug1: read PEM private key done: type DSA debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: try privkey: /home/Steve Fairbairn/.ssh/id_rsa debug1: try pubkey: /home/Steve Fairbairn/.ssh/id_dsa debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: next auth method to try is keyboard-interactive debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: next auth method to try is password Dev AT devtestw2k's password: debug1: ssh-userauth2 successful: method password debug1: channel 0: new [client-session] debug1: send channel open 0 debug1: Entering interactive session. debug1: ssh_session2_setup: id 0 debug1: channel request 0: pty-req debug1: channel request 0: shell debug1: fd 3 setting TCP_NODELAY debug1: channel 0: open confirm rwindow 0 rmax 32768 Fanfare!!! You are successfully logged in to this server!!! ------_=_NextPart_000_01C31A00.05AAAEE0 Content-Type: text/plain; name="ssh-fail.txt" Content-Disposition: attachment; filename="ssh-fail.txt" Steve Fairbairn AT steve_fairbairn ~ $ ssh -v Dev AT devtestw2k OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090608f debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: ssh_connect: needpriv 0 debug1: Connecting to devtestw2k [192.168.101.6] port 22. debug1: Connection established. debug1: identity file /home/Steve Fairbairn/.ssh/identity type -1 debug1: identity file /home/Steve Fairbairn/.ssh/id_rsa type -1 debug1: identity file /home/Steve Fairbairn/.ssh/id_dsa type 2 debug1: Remote protocol version 1.99, remote software version OpenSSH_2.9p2 debug1: match: OpenSSH_2.9p2 pat OpenSSH_2.*,OpenSSH_3.0*,OpenSSH_3.1* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_3.5p1 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: dh_gen_key: priv key bits set: 123/256 debug1: bits set: 524/1024 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'devtestw2k' is known and matches the DSA host key. debug1: Found key in /home/Steve Fairbairn/.ssh/known_hosts:4 debug1: bits set: 527/1024 debug1: ssh_dss_verify: signature correct debug1: kex_derive_keys debug1: newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: waiting for SSH2_MSG_NEWKEYS debug1: newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: done: ssh_kex2. debug1: send SSH2_MSG_SERVICE_REQUEST debug1: service_accept: ssh-userauth debug1: got SSH2_MSG_SERVICE_ACCEPT debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: next auth method to try is publickey debug1: try privkey: /home/Steve Fairbairn/.ssh/identity debug1: read PEM private key done: type DSA debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: try privkey: /home/Steve Fairbairn/.ssh/id_rsa debug1: try pubkey: /home/Steve Fairbairn/.ssh/id_dsa debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: next auth method to try is keyboard-interactive debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: next auth method to try is password Dev AT devtestw2k's password: debug1: authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. Dev AT devtestw2k's password: debug1: authentications that can continue: publickey,password,keyboard-interactive Permission denied, please try again. Dev AT devtestw2k's password: debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: no more auth methods to try Permission denied (publickey,password,keyboard-interactive). debug1: Calling cleanup 0x41b1b0(0x0) ------_=_NextPart_000_01C31A00.05AAAEE0 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/ ------_=_NextPart_000_01C31A00.05AAAEE0--