LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-05-2005, 06:57 AM   #1
steve_nz
LQ Newbie
 
Registered: Aug 2005
Location: UK - LONDON
Posts: 3

Rep: Reputation: 0
Angry cannot transfer files correctly


Hi

I have a number of linux servers that I use.
My development box is REDHAT.
My Live box is REDHAT.
MY internal BOX is DEBIAN WOODY.

My question is: I am trying to transfer files from my development box to my internal box, this can only be done via secure means (scp, ssh, sftp). Everytime that i transfer a file in this direction the file(s) has a ^M symbol at the end of each line ???

I can transfer the file back, and it is fine.

I can transfer a file from any of my other machines to my internal and it is fine.

I can transfer a file from my development to any other than the internal and it is fine???

If i transfer a file from my development to another server, then onto the internal it has the same problem ^M.

I have read about using :%s/^M//g in VI and, yes it does work but is not really a solution as i transfer LOTS of files.

Basically, any file that has been on the Development server and ends up on the internal server is corrupt (for want of a better word).

Does anyone have any idea???

Cheers


p.s Im a real newbie to asking questions so I hope i have explained myself well.
 
Old 08-05-2005, 07:22 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You could encrypt the files by gpg and then use NFS to make the transfer.
The process could even be automated.

Have you tried SSL?
 
Old 08-08-2005, 02:17 PM   #3
steve_nz
LQ Newbie
 
Registered: Aug 2005
Location: UK - LONDON
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Simon

Thanks for the response, and sorry I am so late in getting back.

I had been called away on more urgent business, but am now looking at it again.

I will be trying you ideas out tomorrow.

BUT what i really want to know is WHY????

Do you have any idea why this is occuring?

Is there some sort of seeting i can use to controll Ascii , Binary (guessing this must be the problem).

Cheers
Steve
 
Old 08-08-2005, 03:32 PM   #4
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
My only thought would be that the end line characters are somehow different on each system, or are being interpreted incorrectly. :/
 
Old 08-10-2005, 04:26 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Summary:
^M at the end of each line (ahead of CR (ascii 0xD) I guess?) = X

dev --> int : X
int --> dev : O
any --> int : X
dev --> not(int) : O
dev --> server --> int : X

logically this would be a decryption error on the internal box (running debian).

sftp is ftp over an ssh transport
scp is cp over an ssh transport
ssh is the openSSH client

ssh encryption/decryption should be looked at.

RH (depending) uses tripple-des encryption by default - do not know what debian-woody is using. You should examine the man pages and check ssh version in each machine.

You could try specifying "ssh -c des" to test if this is the problem.

Somehow I doubt it - surely if the 3des wasn't supported somewhere, then the file would decrypt as gibberish! However, comparing how RH and woody handle SSH encryption/decryption would be a good start.
 
Old 08-12-2005, 09:08 AM   #6
steve_nz
LQ Newbie
 
Registered: Aug 2005
Location: UK - LONDON
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Simon

Thanks for the help.

You got me thinking!
The problem was: I was running DEBIAN WOODY which is the stable version of Debian and the apt-get had only recieved stable version of NANO (the editor I use).
this satbel version of Nano 1.0.? was not capabe of converting from DOS file type.

WHAT I DID:
Incase anyone else has this problem, here is what i did.

I changed the source.list for apt-get in /etc/apt/soure.list to include a testing site
e.g. deb ftp://ftp.uk.debian.org/debian/ testing main contrib

then I ran # apt-get update

then # apt-get install nano

This installed nano version 1.2.4 which now displays the text without DOS ^M at the end of each line.

Then i changed the source.list file back again to the stable addresses.

NOTE: I didn't pick this up straight away because my other servers are DEBIAN SARGE which is currently a testing release and this apt-get got the testing version of NANO.

Also i did a apt-get install sysutils (on stable), this is a group of tools for debian which includes dos2unix or fromdos, both of which are excellent for actually converting the files to Unix type i.e. ^J not ^M.


My solution with the nano upgrade now means I can view and edit the files with no Probs of the ^M being in the way.


Cheers
Steve
 
Old 08-15-2005, 06:23 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Excellent: hopefully you also picked up the technique of isolating the problem. Usually once you know where the trouble lies, you can identify it. ONce identified, the solution often presents itself

That's basic scientific method that is.
Good work.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How transfer files? zpxykm Linux - Newbie 4 11-24-2005 03:03 AM
Can't Transfer Files derek-888 Linux - General 9 11-29-2003 12:41 PM
how do I transfer files dogma Linux - Newbie 5 05-27-2003 06:11 PM
Transfer files ust Linux - General 1 04-10-2003 07:19 AM
Best Way to Transfer Files? Cynthia Blue Linux - Newbie 20 12-14-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:20 PM.

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