Unable to scp/sftp between two servers


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unable to scp/sftp between two servers
# 1  
Old 09-12-2008
Unable to scp/sftp between two servers

I have four servers that for all intents and purposes are the same (I have the same profile on all four), North, South, Brooklyn & Queens.

I have a script that scp's a file from Queens to brooklyn, and it runs just fine. I tried to replicate the script on South, to transfer a file to North, and it fails every time with the message: "Received message too long 538976288".

Since I have same profile on both North & Brooklyn, I don't understand why the transfer fails to north, but not to brooklyn.

I tried using the generic login for the servers and it works, but under my profile it does not.

If it helps here are my profiles on the two servers being connected to:

Northern:
Code:
(14:51:49\[ddecosta@N.Man)
[~]$ nl .bashrc 
     1  #PS1='[\u@MANDNCS]\w\$ '
     2  alias ltr='ls -ltrFh'
     3  alias la='ls -ltra'
     4  cat ~/simp.txt
     5  alias th='tellDhct'
     6  alias lq='listQpsk'
     7  export EDITOR="vi"
     8  alias boxload='/dvs/dncs/bin/_dhctui -t dhct'
     9  alias Sourceui='/dvs/dncs/bin/_sourceui'
    10  export HISTCONTROL"=ignoredups"
    11  export PS1="\n\[\033[1;33m\](\[\033[0;37m\]\t\[\033[0;32m\]\\\\\\\[\033[0;37m\]\u@N.Man\[\033[1;33m\])\[\033[0;32m\]\n[\[\033[0;37m\]\w\[\033[0;32m\]]\[\033[0;37m\]$\[\033[0m\] "

Brooklyn:
Code:
(14:39:31\[ddecosta@Brooklyn)
[~]$ nl .bashrc 
     1  #PS1='[\u@BKDNCS]\w\$ '
     2  cat ~/simp.txt
     3  alias ltr='ls -ltrhF'
     4  alias la='ls -ltra'
     5  alias lq='listQpsk'
     6  export EDITOR="vi"
     7  alias th='tellDhct'
     8  alias boxload='/dvs/dncs/bin/_dhctui -t dhct'
     9  alias Sourceui='/dvs/dncs/bin/_sourceui'
    10  export HISTCONTROL"=ignoredups"
    11  export PS1="\n\[\033[1;33m\](\[\033[0;37m\]\t\[\033[0;32m\]\\\\\\\[\033[0;37m\]\u@Brooklyn\[\033[1;33m\])\[\033[0;32m\]\n[\[\033[0;37m\]\w\[\033[0;32m\]]\[\033[0;37m\]$\[\033[0m\] "

and this is what it returns when I try to SFTP:

Code:
(14:50:46\[ddecosta@S.Man)
[~]$ sftp 10.252.1.1
Connecting to 10.252.1.1...
Received message too long 538976288

# 2  
Old 09-12-2008
That error usually means emitting characters to a dumb terminal (sftp)

copy your .bashrc to .bashrc-local or something.
change .bashrc to:
Code:
if [ ${TERM} != "dumb" ]; then
  test -s ~/.bashrc-local && . ~/.bashrc-local
fi

which will stop your .bashrc from emitting chars to wrong term type
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automate scp between servers

Hello, Could someone please help me with the below requirement? I need to automate scp files between two servers. I have a file having server names and paths to the folder like below server1 /path/to/folder/ server1 /path/to/folder/ server1 /path/to/folder/ server2 /path/to/folder/... (4 Replies)
Discussion started by: Kochappa
4 Replies

2. Shell Programming and Scripting

scp without password between two servers

Hello Folks, I have two linux server accounts server1 and server2 From the terminal if I say this command, scp /source/folder/from/server1/unix.txt user@server2.com:/destination/folder/ Then it prompts for the password user@server2.com's password: I enter my password and then it... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

3. Shell Programming and Scripting

SFTP / SCP using password

Hi, I was provided with sftp servername, user and password and the requirement is to connect to sftp server using credentials provided and drop the file. Manually i am able to connect with commands like sftp user@servername and after clicking enter, i was asked for a password and entering... (4 Replies)
Discussion started by: forums123456
4 Replies

4. AIX

Able to scp/ssh to AIX 6.1 machine, unable to sftp to it

Hello, I am trying to figure out why I cannot sftp onto our aix6.1 machine. I can ssh/scp onto it, and sftp outbound seems to work properly, but I can't sftp onto it. # sftp aix61 Connecting to aix61... root@aix61's password: Connection closed # This machine appears to have the pware... (2 Replies)
Discussion started by: bstring
2 Replies

5. Shell Programming and Scripting

SFTP and SCP help

Hi All, I have to make an automated script that needs to do SFTP or SCP from my Unix server to another Unix server. I have gone through search of this website for sftp and scp. I really get confused when it talk about ssh key or rsh key and sftp -b thing I would really appreciate if... (4 Replies)
Discussion started by: pinnacle
4 Replies

6. AIX

what to use sftp or scp

hi, i have a weird problem i have to copy the file with caret(^) in it. but when i tries to copy with scp. It(scp) says that it cant use ^file_name scp mohit^narang user@machine/mohit^narang the error comes in the second parameter.if i used user@machine/mohit_narang(under score) instead... (2 Replies)
Discussion started by: narang.mohit
2 Replies

7. Shell Programming and Scripting

Script to SCP a file to multiple servers

Hi All, I am a total noob to the Unix world, and i hope to learn a lot from this wonderful community. Here's my first post and question , i am trying to SCP a file to multiple servers (multiple destinations) through this little script : #!/bin/ksh # copy files # File to be copied... (7 Replies)
Discussion started by: rdlover
7 Replies

8. Shell Programming and Scripting

Scp between two servers

Is there a way to connect betwwen two servers A and B without using prompting for a password ..... I am writing a script which includes picking up files from and puts them to B. using mget .. To make the script fully automable I am looking for a passwordless authentication... Any... (2 Replies)
Discussion started by: ultimatix
2 Replies

9. UNIX for Advanced & Expert Users

sftp vs scp

My transmit rates are waaay faster using scp over sftp....anyone know why scp is faster than sftp? I am using solaris 8 for my unix systems. -S (2 Replies)
Discussion started by: Sowser
2 Replies

10. Shell Programming and Scripting

scp between 2 servers - invoked at 3rd server

I have a couple of servers that can't see each other and need to copy files from one to the other. I try to invoke scp from a 3rd server that can see both servers - get error msgs that are cryptic. from server C I can do scp user@serverA:~/file . scp file user@serverB:~ but if I try to... (2 Replies)
Discussion started by: bigjohn-nj
2 Replies
Login or Register to Ask a Question