LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2012, 05:41 AM   #1
Antowns
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Remoting (SSH) into a cygwin box - error inside


Hi all,

Trying to remote into a SSH Win XP machine running Cygwin (Password based auth, not keys) and I'm receiving the following error, bearing in mind that other users are able to remote into the same box without errors, I've posted a log below to see if anyone can depict any issue with it.

Code:
ant@as:~$ ssh -v -v Administrator@10.1.1.29
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.1.1.29 [10.1.1.29] port 22.
debug1: Connection established.
debug1: identity file /home/ant/.ssh/id_rsa type -1
debug1: identity file /home/ant/.ssh/id_rsa-cert type -1
debug1: identity file /home/ant/.ssh/id_dsa type -1
debug1: identity file /home/ant/.ssh/id_dsa-cert type -1
debug1: identity file /home/ant/.ssh/id_ecdsa type -1
debug1: identity file /home/ant/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
ant@as:~$
It may be worth mentioning that where its saying 'Identity file', those don't actually exist (file wise) in the .ssh directory. Been pulling my hair out about this. Any help would be appreciated. I moved my config and known_hosts file from the .ssh directory leaving 1 private key used for a different machine in there.

Last edited by Antowns; 06-18-2012 at 05:42 AM.
 
Old 06-18-2012, 07:16 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
ssh expects the connection to be secure and will fail if it can't be made secure. Most commonly I see it fail because either the user's home directory (and/or directories above it) are wide open (e.g. 777 or 666) so allow modification of all files within it including ssh files. At best the home should be chmod'ed 755. Additionally the user's .ssh subdirectory should ONLY be accessible by the user (e.g. chmod'ed 700). Allowing others to change a user's ssh setup means it can't be made secure so ssh will fail without giving good reasons.
 
Old 06-18-2012, 11:13 AM   #3
Antowns
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MensaWater View Post
ssh expects the connection to be secure and will fail if it can't be made secure. Most commonly I see it fail because either the user's home directory (and/or directories above it) are wide open (e.g. 777 or 666) so allow modification of all files within it including ssh files. At best the home should be chmod'ed 755. Additionally the user's .ssh subdirectory should ONLY be accessible by the user (e.g. chmod'ed 700). Allowing others to change a user's ssh setup means it can't be made secure so ssh will fail without giving good reasons.
Hi,

I chmod'd everything in the home directory including the .ssh folder to 700. This unfortunately didn't help, do you have any other ideas? why are those rsa keys being referenced in the debug output if they don't exist?

Ant
 
Old 06-18-2012, 11:52 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Its just checking to see if they exits. The -1 on each is telling you they don't.

Do you have XP's firewall set to allow inbound connections to port 22?

Have you verified the directory permissions for BOTH the target user on XP and the source user on the host from which you're launching the ssh?
 
Old 06-18-2012, 11:56 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
What Cygwin version are you running?

I've never been able to get the sshd server working properly on the new version of Cygwin (v1.7) under Win XP. The old Cygwin (called "legacy" on their site, I believe it's v1.5) works fine on XP, and the new Cygwin works fine on Win 7, but the new Cygwin has major sshd problems on XP in my experience.

Last edited by suicidaleggroll; 06-18-2012 at 11:57 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cygwin ssh setup permissions error aloishis89 Linux - Software 7 02-11-2009 10:35 PM
bash: INPUT/OUTPUT error when remoting in saanjac Linux - Newbie 2 08-08-2008 03:38 PM
SSH with X through Cygwin to my Linux Box timothyb89 Linux - Software 10 07-08-2006 04:53 PM
Cannot ssh to debian box from Gentoo box or Putty, but I can from Cygwin? Pengus Linux - Networking 2 01-20-2006 12:47 PM
SSH with Cygwin UltraSoul Linux - General 0 07-07-2005 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration