LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-02-2009, 08:51 AM   #1
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
SFTP fails from RHEL 4.6 AS to Windows 2003 Server running WS_FTP


Folks,

When I try to sftp from a particular RHEL 4.6 AS client to a Windows 2003 Server on our network running WS_FTP, I get the following error.

$ sftp <user>@<sftp_server>
Connecting to <sftp_server>...
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer

This client can connect to external ftp sites. There is no firewall between the client and server and we do not have IPTables enabled on the client. We have other clients that run a similar version of RHEL and they run without any problems. I don't see anything peculiar with this particular client or perhaps I am not looking in the right place.

Any leads would be appreciated. Thanks!
 
Old 04-02-2009, 09:02 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
nothing there really, anythign on the server side? try adding some -v's to the command line.
 
Old 04-02-2009, 09:15 AM   #3
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Original Poster
Rep: Reputation: 28
Well, I inserted the -v switch and I get the following:

# sftp -v <user>@<server_name>
Connecting to <server_name>...
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /root/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to <server_name> <[ip_address]> port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer
 
Old 04-02-2009, 09:29 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
still clearly nothing useful, add another, but fi the server is closing the connection, then there really shuld be something on their side. Check the logs there.
 
Old 04-02-2009, 10:05 AM   #5
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Original Poster
Rep: Reputation: 28
# sftp -vvv <user>@<server_name>
Connecting to cob-sftpp-01...
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /root/.ssh/config
debug1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <server_name> <[ip_address]> port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug3: Not a RSA1 key file /root/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /root/.ssh/id_rsa type 1
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer
 
Old 04-03-2009, 07:28 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,735

Rep: Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523
Quote:
debug2: key_type_from_name: unknown key type '-----BEGIN'
.
.
.
debug2: key_type_from_name: unknown key type '-----END'
means key has been corrupted/overwritten.
Hopefully not a hack attack, but you need to re-generate this key.
I'd check all the keys you have in case they have issues too.
 
Old 04-06-2009, 09:06 AM   #7
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Original Poster
Rep: Reputation: 28
Thanks for the reply. I did try to regenerate the keys with ssh-keygen -t rsa, however that did not help either and the problem persists.

The one thing that I noticed on another linux client on which sftp runs fine was that the ~/.ssh folder did not contain any keys (rsa or dsa). So my understanding is that for the sftp process, key generation is not a necessity; however, as a rule of thumb, the process checks the integrity of the keys present in ~/.ssh. Is it safe for me to assume that?
 
Old 04-06-2009, 01:24 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
Yes, those keys are only needed for private key authentication, not password authentication.
 
  


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
Running linux(CentOS) as virtual server on Windows 2003 server? manoj.maniraj Linux - Server 3 03-26-2009 04:08 AM
Running Windows Server 2003 under qemu in a secure Linux sandbox neilcpp Linux - Software 1 02-16-2009 12:10 AM
Windows 2003 server on RHEL 5 Xen as FVM bobbera Linux - Newbie 3 05-21-2008 04:10 AM
Windows 2003 server on RHEL 5 Xen bobbera Linux - Enterprise 0 05-19-2008 02:24 PM
SFTP - Linux - WS_FTP waffe Linux - Networking 1 10-13-2003 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration