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 Date: Wed, 30 Apr 2003 12:49:02 +0300 Message-Id: <200304300949.h3U9n2uX008695@beta.mvs.co.il> From: "Ehud Karni" To: cygwin AT cygwin DOT com Subject: Re: ssh doesn't like $HOME In-reply-to: <20030429171759.GO19711@cygbert.vinschen.de> (message from Corinna Vinschen on Tue, 29 Apr 2003 19:17:59 +0200) Organization: Mivtach-Simon Insurance agencies Reply-to: ehud AT unix DOT mvs DOT co DOT il References: <3EAE9CC1 DOT 6060608 AT imag DOT fr> <20030429154926 DOT GM19711 AT cygbert DOT vinschen DOT de> <200304291649 DOT h3TGnpB5011725 AT beta DOT mvs DOT co DOT il> <20030429171759 DOT GO19711 AT cygbert DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 29 Apr 2003 19:17:59 +0200, Corinna Vinschen wrote: > > On Tue, Apr 29, 2003 at 07:49:51PM +0300, Ehud Karni wrote: > > On Tue, 29 Apr 2003 17:49:26 +0200, Corinna Vinschen wrote: > > > ssh never uses the $HOME value. It uses the home dir given in the user's > > > /etc/passwd entry. > > > > - From my experience (without reading the source) this is not exactly > > true. If the /etc/passwd file exists it is used, but if it does not > > exist, the $HOME is used. You can check it by using the -v (debug > > switch) for ssh: > > It only uses $HOME when trying to evaluate `~' (tilde) in a path. NO. it is using $HOME also for the .ssh directory. I'm running it like this: ssh -v target and ssh finds my config file and key that are under $HOME/.ssh . Here are some relvant parts of the strace: 1. getting HOME from the Windows environment - 55 3488 [main] ssh 2016 path_conv::check: root_dir(c:\), this->path(c:\tty), set_has_acls(8) 54 3542 [main] ssh 2016 win_env::add_cache: posix /cygdrive/c/tty 50 3592 [main] ssh 2016 win_env::add_cache: native HOME=c:\tty 50 3642 [main] ssh 2016 posify: env var converted to HOME=/cygdrive/c/tty 92 3734 [main] ssh 2016 environ_init: 0x100F0610: HOME=/cygdrive/c/tty 94 3828 [main] ssh 2016 environ_init: 0x100F0848: HOMEDRIVE=C: 2. Using $HOME when reading /etc/passwd fails (for the ~ expansion) 59 33942 [main] ssh 2016 pwdgrp::load: /etc/passwd 52 33994 [main] ssh 2016 pwdgrp::load: strange path_conv problem 51 34045 [main] ssh 2016 pwdgrp::load: /etc/passwd load failed 121 34166 [main] ssh 2016 cygheap_user::ontherange: what 2, pw 0x0 57 34223 [main] ssh 2016 cygheap_user::ontherange: HOME is already in the environment /cygdrive/c/tty 3. Trying to read config file - 53 103617 [main] ssh 2016 pwdgrp::load: /etc/passwd 53 103670 [main] ssh 2016 pwdgrp::load: strange path_conv problem 52 103722 [main] ssh 2016 pwdgrp::load: /etc/passwd load failed ... 73334 177974 [main] ssh 2016 isatty: 1 = isatty (0) 153 178127 [main] ssh 2016 open: open (/cygdrive/c/tty/.ssh/config, 0x0) ... 55 179458 [main] ssh 2016 open: 3 = open (/cygdrive/c/tty/.ssh/config, 0x0) 4. Trying to read identity/id_dsa - 56 8619035 [main] ssh 2016 pwdgrp::load: /etc/passwd 55 8619090 [main] ssh 2016 pwdgrp::load: strange path_conv problem 54 8619144 [main] ssh 2016 pwdgrp::load: /etc/passwd load failed 146 8619290 [main] ssh 2016 open: open (/cygdrive/c/tty/.ssh/identity, 0x10000) ... 60 8623388 [main] ssh 2016 open: -1 = open (/cygdrive/c/tty/.ssh/identity, 0x0) 56 8637500 [main] ssh 2016 pwdgrp::load: /etc/passwd 54 8637554 [main] ssh 2016 pwdgrp::load: strange path_conv problem 55 8637609 [main] ssh 2016 pwdgrp::load: /etc/passwd load failed 137 8637746 [main] ssh 2016 open: open (/cygdrive/c/tty/.ssh/id_dsa, 0x10000) ... 57 8639107 [main] ssh 2016 open: 4 = open (/cygdrive/c/tty/.ssh/id_dsa, 0x10000) Ehud. - -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ mailto:ehud AT unix DOT mvs DOT co DOT il Better Safe Than Sorry -----BEGIN PGP SIGNATURE----- Comment: use http://www.keyserver.net/ to get my key (and others) iD8DBQE+r5wNLFvTvpjqOY0RAmMVAJ9By3c8UXlskrNx+3BK5Jf291ZK+gCfb71t XCYOUHFTaxzXFMYDwNw8OS4= =250U -----END PGP SIGNATURE----- -- 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/