homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

The Geek Culture Forums


Post New Topic  New Poll  Post A Reply
my profile | directory login | | search | faq | forum home
  next oldest topic   next newest topic
» The Geek Culture Forums   » Other Geeky Stuff   » Ask a Geek!   » sftp problems

 - UBBFriend: Email this page to someone!    
Author Topic: sftp problems
littlefish
BlabberMouth, a Blabber Odyssey
Member # 966

Member Rated:
4
Icon 1 posted March 22, 2006 05:48      Profile for littlefish   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
I have an account on a sun box, and recently it has refused to allow me to connect via sftp.

ssh works fine, and ftp works fine. It is somethinb server side- I think I must have deleted a dotfile that is needed, but I can't seem to find anything about it. If I use verbose, everything seems OK until near the end, where I get this error:

Received message too long 842473572
holyrood$ debug1: client_input_channel_req: channel 0 rtype exit-status
reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0

Can anyone tell me what I need in my home directory to get it working again?

Cheers!

Posts: 2421 | From: That London | Registered: Nov 2001  |  IP: Logged
jfw
Solid Nitrozanium SuperFan!
Member # 1923

Member Rated:
5
Icon 1 posted March 23, 2006 14:50      Profile for jfw     Send New Private Message       Edit/Delete Post   Reply With Quote 
The "message length" number, displayed in hexadecimal, is 0x32372064, which just happens to be the character values for '2', '7', ' ', and 'd'. Maybe it's coincidence, but that looks awfully suspicious, and makes me think of text being misinterpreted as protocol control information, which makes me suspect a version problem between the server and client (or a plain implementation error).

On the sun, can you use sftp locally (i.e. copy a file to /tmp/testfile, then use "sftp [email protected]:/tmp/testfile" to retrieve that file to your working directory)? Can the sun's sftp client access the sftp server on the host you usually use as the client? Have you tried retrieving short and long files, binary and text?

Does your normal sftp client support the -1 flag to force SSH 1.0 protocol? (If it's a Mac, the answer is "yes".) You might try that; or the -C flag to enable compression. (Normally I would suspect compression of making things worse, but if there's some kind of data-pattern sensitivity going on, it might avoid the unfortunate pattern.)

Do you happen to know if the sun is using the OpenSSH code, or something Sun themselves cooked up? If it's something from Sun, do you have administrative privileges to compile OpenSSH and install something that works? [Wink]

Posts: 20 | From: Boxboro Massachusetts | Registered: Jan 2003  |  IP: Logged
nerdwithnofriends
Uber Geek
Member # 3773

Icon 1 posted March 23, 2006 16:47      Profile for nerdwithnofriends     Send New Private Message       Edit/Delete Post   Reply With Quote 
I find it interesting that it says something about fd 0 - the standard input. It looks like it's setting stdin to poll instead of block (clearing NONBLOCK). Perhaps this has something to do with running sftp through ssh? pty's can behave pretty strangely from what I've read, so maybe there's some kind of option you can change through ssh?

--------------------
"The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower." - Robert M. Pirsig

Posts: 948 | Registered: Mar 2005  |  IP: Logged
quantumfluff
BlabberMouth, a Blabber Odyssey
Member # 450

Member Rated:
5
Icon 1 posted March 23, 2006 18:00      Profile for quantumfluff     Send New Private Message       Edit/Delete Post   Reply With Quote 
Are you sending a file that is over 2G long? That will break many implementations of almost anything, and you'll get an incorrect file length message.
Posts: 2901 | From: 5 to 15 meters above sea level | Registered: Jun 2000  |  IP: Logged
littlefish
BlabberMouth, a Blabber Odyssey
Member # 966

Member Rated:
4
Icon 1 posted March 24, 2006 01:52      Profile for littlefish   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
On the sun, can you use sftp locally (i.e. copy a file to /tmp/testfile, then use "sftp [email protected]:/tmp/testfile" to retrieve that file to your working directory)?
This returns: "Received message too long 842342500"

quote:
Can the sun's sftp client access the sftp server on the host you usually use as the client?
I don't have any other handy machines. I use windows as the cclient usually. Other peoples accounts on the sun box work fine.

quote:
Have you tried retrieving short and long files, binary and text?
I usually sftp in (sftp [email protected]), then use "put" or "get" to obtain the files I need. In this case I'm getting a failure before I can transfer any files.

[quote]Do you happen to know if the sun is using the OpenSSH code, or something Sun themselves cooked up? If it's something from Sun, do you have administrative privileges to compile OpenSSH and install something that works?[quote]

I'm a student at a university, so the sun is multi-user and I have no priviledges beyond my home directory. Could I compile sftp in 10meg and keep it in ~/bin?

Posts: 2421 | From: That London | Registered: Nov 2001  |  IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted March 24, 2006 06:23      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by littlefish:

I'm a student at a university, so the sun is multi-user and I have no priviledges beyond my home directory. Could I compile sftp in 10meg and keep it in ~/bin?

Erm...before I answer that with 'no,' let me clarify something - from where to where are you trying to SFTP files? From a local Sun box to a big Sun box? If you're trying to reach the big box from elsewhere, the compilation idea is kind of pointless, as SFTP has to be listening for requests, and that's more than a notion (unless their security is poor). If you're trying to send it from one Solaris box to another, and you suspect the client to be in error, then go for it w.r.t. compiling your own copy.

Might I suggest trying SCP instead?

Usage:
$ scp somefile [email protected]:/path/to/destination

For instance, if I wanted to update my web page on one box:
$ scp index.html [email protected]:~/public_html

SCP is part of OpenSSH, and may already be set up on your system. It operates on port 22, and requests credentials in the same manner (accepting auth. via pub/priv. key as well). It's nicer than SFTP, IMHO.

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
GameMaster
BlabberMouth, a Blabber Odyssey
Member # 1173

Member Rated:
4
Icon 1 posted March 24, 2006 17:06      Profile for GameMaster   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
No, you couldn't compile it to...
1.) sshd is already listening
2.) If you change the port, you'll likely run into the firewall.

scp uses the same port/protocol. I expect the problem to occur with it too.

You have a few options.
1.) Start a ssh/sftp server on your home machine, mingw/cygwin would be helpful for this, and try to go the other way.
2.) try a differnt client on the client side, try installing a new client.
3.) Contact the sysadmin.

--------------------
My Site

Posts: 3038 | From: State of insanity | Registered: Mar 2002  |  IP: Logged
littlefish
BlabberMouth, a Blabber Odyssey
Member # 966

Member Rated:
4
Icon 1 posted March 29, 2006 02:30      Profile for littlefish   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
I've been away for a few days, but I'm back now, and the problem hasn't solved itself.

I use a managed desktop windows machine at work, and my own mac mini running 10.4 at home for various things to connect through to the server.

Both of my client machines get errors on trying to sftp, though ssh is fine. The windows client is "The SSH Secure Shell for Workstations Windows client", and 10.4 has whatever it shipped with. I'm sure that I've screwed soemthing up server side in my home directory, as other people with accounts on the server are having no problems. I'm reluctant to speak to the sysadmin, as the status of my having a login is slightly dodgy, and I may get my account removed.

I was hoping that there would be an easy list of files that I needed (like a .sftp_rc or something) that would solve all my problems. I can manage a workaround, but it is annoying.

Posts: 2421 | From: That London | Registered: Nov 2001  |  IP: Logged


All times are Eastern Time  
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | Geek Culture Home Page

2015 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0



homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam