Mail Archives: cygwin/2011/05/06/18:17:59
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,TW_MK,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
|
X-Spam-Check-By: | sourceware.org
|
Message-ID: | <31562709.post@talk.nabble.com>
|
Date: | Fri, 6 May 2011 15:17:29 -0700 (PDT)
|
From: | Metroshica <Landonwo AT gmail DOT com>
|
To: | cygwin AT cygwin DOT com
|
Subject: | Re: Issue with SCP and SSH on Windows 7
|
In-Reply-To: | <4DC4655F.60708@bopp.net>
|
MIME-Version: | 1.0
|
References: | <31561012 DOT post AT talk DOT nabble DOT com> <4DC4655F DOT 60708 AT bopp DOT net>
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
Jeremy, I don't know who you are, but I don't feel uncomfortable saying I
love you. Thank you so much for the help, cleared the issue right up.
Jeremy Bopp-3 wrote:
>
> On 5/6/2011 12:54, Metroshica wrote:
>>
>> I have recently written a script in Windows Server Edition 2008 that
>> SSHes
>> into a few linux servers, and then uses SCP to copy a file out of them.
>> The
>> issue I'm having is with SSH keys getting set up, and cygwin trying to
>> create a .ssh directory in the C:/ directory, instead of where cygwin is
>> located.
>
> Check to make sure that you don't have the HOME environment variable
> configured to C:. If it is, you need to remove it just in case, but you
> may try adding it back once you get things working. Next, you need to
> check that the user account used to run scp has an entry in the
> /etc/passwd file within the Cygwin installation:
>
> grep ^the_user: /etc/passwd
>
> That won't output anything if the_user does not have an entry in that
> file. Otherwise, you'll see the record for the_user. If you see such a
> record, take a look at the path that appears between the last and second
> to last colons in the line. That path is the home directory that Cygwin
> programs such as the SSH tools will use. Set it to a Cygwin-style path
> that points to the proper location.
>
> If the grep command doesn't output anything, you can add an appropriate
> entry by running the following from the bash shell:
>
> mkpasswd -u the_user -d >>/etc/passwd
>
> If the account is *not* a domain account, use this instead:
>
> mkpasswd -u the_user -l >>/etc/passwd
>
> These changes should correct the issue by allowing the SSH family of
> programs to correctly find the user's home directory as configured under
> Cygwin.
>
>> I'm running this program through the standard windows command
>> prompt, not cygwin's shell, as it is an automated process, and I don't
>> know
>> how to automatically run a program in cygwin. Anyone know how I can
>> change
>> the home directory to be C:/cygwin/home/user instead of the base C:/ dir,
>> or
>> anyone know how to automatically run a script in cygwin? Thanks for the
>> help.
>
> You should be fine with running things directly from Windows programs,
> including the command prompt, unless you need extra environment settings
> provided by Cygwin to login shells. Since you're otherwise running
> things successfully apparently, don't worry about changing this part.
>
> -Jeremy
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
>
>
--
View this message in context: http://old.nabble.com/Issue-with-SCP-and-SSH-on-Windows-7-tp31561012p31562709.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -