From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99904 invoked by alias); 28 Jan 2016 15:52:50 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 99893 invoked by uid 89); 28 Jan 2016 15:52:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: Yes, score=5.5 required=5.0 tests=BAYES_60,CYGWIN_OWNER_BODY,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 spammy=Prior, analyst, roots, Analyst X-HELO: mailuogwhop.emc.com Received: from mailuogwhop.emc.com (HELO mailuogwhop.emc.com) (168.159.213.141) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Jan 2016 15:52:47 +0000 Received: from maildlpprd02.lss.emc.com (maildlpprd02.lss.emc.com [10.253.24.34]) by mailuogwprd02.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u0SFqi2x024185 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 28 Jan 2016 10:52:44 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com u0SFqi2x024185 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com u0SFqi2x024185 Received: from mailusrhubprd01.lss.emc.com (mailusrhubprd01.lss.emc.com [10.253.24.19]) by maildlpprd02.lss.emc.com (RSA Interceptor) for ; Thu, 28 Jan 2016 10:52:11 -0500 Received: from MXHUB210.corp.emc.com (MXHUB210.corp.emc.com [10.253.68.36]) by mailusrhubprd01.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u0SFqNVr024754 (version=TLSv1.2 cipher=AES128-SHA256 bits=128 verify=FAIL) for ; Thu, 28 Jan 2016 10:52:24 -0500 Received: from MX204CL04.corp.emc.com ([fe80::5c2f:a83c:a32d:4b29]) by MXHUB210.corp.emc.com ([10.253.68.36]) with mapi id 14.03.0266.001; Thu, 28 Jan 2016 10:52:23 -0500 From: "Gluszczak, Glenn" To: "cygwin@cygwin.com" Subject: RE: Issue Setting up SFTP/OpenSSH on Multiple PLatforms Date: Thu, 28 Jan 2016 17:02:00 -0000 Message-ID: <91DCAC3CB99C724EB365BB64677FBE7B028FDD@MX204CL04.corp.emc.com> References: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd01.lss.emc.com X-RSA-Classifications: public X-SW-Source: 2016-01/txt/msg00425.txt.bz2 Sorry didn't proofread and had bad cut & paste Step 3 -- Log out of Windows and generate the key pair on the MAC if necess= ary, not Windows Step 5 should be ssh myuser@windows_machine cd ~/.ssh cat id_rsa-MACmachinename.pub >> authorized_keys chmod 600 authorized_keys -----Original Message----- From: Gluszczak, Glenn=20 Sent: Thursday, January 28, 2016 10:43 AM To: cygwin@cygwin.com Subject: RE: Issue Setting up SFTP/OpenSSH on Multiple PLatforms I never got ssh-copy-id to work from Linux to Windows and couldn't be bothe= red tracing it. At first, the key was going to the Windows user's home directory -- C:\user= s\myuser Thereafter there might have been a path issue as /home/myuser equa= tes to C:\cygwin\home\myuser. But ssh-copy-id doesn't do very much. 1) You probably know this, but check the usernames are the same on both mac= hines. 2) On Windows, ensure the home directory for your user is /home/myuser in /= etc/passwd. You can verify it is working by seeing which directory you are at when you = login ssh myuser@windows_machine pwd 2) Once you have done that, from the remote machine (MAC), log in as myuse= r and cd ~/.ssh (~ is the users home directory). 3) You should have an id_rsa.pub public key. If you don't, generate a key = pair using ssh-keygen -t rsa -b 4096 -C "myuser@MACmachinename" 4) scp id_rsa.pub myuser@windows_machine:.ssh/id_rsa-MACmachinename.pub 5) ssh myuser@windows_machine cd ~/.ssh cat myuser@windows_machine:.ssh/id_rsa-MACmachinename.pub >> authorized_key= s chmod 600 autohorized_keys 6) logout and test ssh myuser@windows_machine -----Original Message----- From: Brendan Maloney [mailto:maloneybw@tamug.edu] Sent: Wednesday, January 27, 2016 4:47 PM To: cygwin@cygwin.com Subject: RE: Issue Setting up SFTP/OpenSSH on Multiple PLatforms I'm using ssh--copy-id which should do the same thing but I keep getting a = "permission denied" error after I enter my password. I read up on this a l= ittle and did a chmod 0700 /home/user/.ssh to make sure permissions on that= folder were right but it still didn't work. Would doing it using the "cat= " method be any different? Can you provide syntax for this? I'm trying to= find a guide for this that shows me what command to use to do it but maybe= after messing with this stupid server for so long Google has stopped being= my friend. Brendan=20 -----Original Message----- From: Gluszczak, Glenn [mailto:glenn.gluszczak@emc.com] Sent: Wednesday, January 27, 2016 3:06 PM To: Brendan Maloney Subject: RE: Issue Setting up SFTP/OpenSSH on Multiple PLatforms Cat your id_rsa.pub from the remote machine into ~/.ssh/authorized_keys. A= lso need to ensure permissions on files are correct. I have numerous Unix/Linux machines working with cygwin. Should be no diff= erent for MAC. -----Original Message----- From: Brendan Maloney [mailto:maloneybw@tamug.edu] Sent: Wednesday, January 27, 2016 4:01 PM To: cygwin@cygwin.com Subject: RE: Issue Setting up SFTP/OpenSSH on Multiple PLatforms Ok I fixed the problem with not being able to connect from my mac systems. = I had to change a bunch of permissions that I found in a different setup g= uide and it started working. I can use ssh and sftp from command line as w= ell as Filezilla although it doesn't seem to recognize my default path like= it does from my windows systems, but I think I can hack my way around that= in the script by just using some different CD commands. So the problem I'= m having now is that I'm trying to get public/private key authentication wo= rking. I've used ssh-copy-id from my mac though I'm not sure I'm using it = right but I'm not sure what I need to do on the Cygwin side. The key seeme= d to copy over to a random folder and I moved it to ~/.ssh thinking this is= where it should go but every time I try to use SFTP from the command line = it still prompts me for my password so the key authentication is obviously = not working. Brendan -----Original Message----- From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of= Bob Coho Sent: Wednesday, January 27, 2016 10:08 AM To: cygwin@cygwin.com Subject: Re: Issue Setting up SFTP/OpenSSH on Multiple PLatforms Brendan, Is your Windows server running Windows 10? I had a similar issue and instal= ling Openssh 7.1p1-1 solved this issue. Openssh 7.1p2-1 had no issues with Windows 7 or XP, but I could not get it = to work with Windows 10. I don't have access to a Windows 8 environment so = I can't say if it will work or not. -----Original Message----- From: Brendan Maloney Sent: Tuesday, January 26, 2016 6:33 PM To: cygwin@cygwin.com Subject: Issue Setting up SFTP/OpenSSH on Multiple PLatforms I've done this once before (Prior to the posix user release of openssh) and= I had no problems setting up SFTP on a windows server. Now I'm trying to = do it again and I'm running into nothing but weird problems. I followed th= e normal package installation and ran the ssh-host-config installer which s= eemed to run fine. Inititially I thought the POSIX change for users would = be great except that this is a domain machine and it allowed all of my doma= in users access to SFTP when I only wanted that access available to the loc= al users I specified. Going back to my roots I created the /etc/group=20 and /etc/passwd files to manage my user accounts. Now here is where it=20 starts to get weird. By default now the users populate the passwd file as = +. When it's configured like this I cannot successfu= lly connect via sftp (I'm using Filezilla) to the server. What I ended up = having to do was manually edit the file and take out the "+" of= the passwd file for the users I wanted to have access.=20 Now I can login to the server successfully, but weirdly enough this ONLY wo= rks on a PC. I'm also trying to get a mac to connect (also using FIlezilla) and it won't connect at all. I've also tried just using the sft= p command line tool in os x and it just immediately drops the connection.=20 Ultimately I'm trying to get some scripts migrated from running FTP on this= server to running SFTP. I'm using psftp on the windows machine which work= s just fine (same as filezilla does) and it's able to run my batch script j= ust fine. I was trying to do the same thing on the mac by using the sftp c= ommand and setting up public/private key authentication (which I still have= n't figured out partly because I'm obviously having these other issues with= the connection in the first place so it's really hard to test. It would b= e great if there were some kind of log file on the Cygwin server so I could= see what was failing when the macs try to connect to SFTP and the PCs conn= ect successfully. I realize this is a lot but I'm not sure who to ask anym= ore and I'm really lost. I'm just a Systems Analyst and I don't work doing= this kind of stuff everyday.it was just something I got tasked with doing = because I have the most linux/mac experience of anyone in my department whi= ch after this little escapade feels like pretty much zero. Thanks in advance for the help Brendan -- 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=20 -- 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 -- 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