Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unable to scp/sftp between two servers Post 302235736 by DeCoTwc on Friday 12th of September 2008 02:58:54 PM
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

 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
WHICH(1)						      General Commands Manual							  WHICH(1)

NAME
which - shows the full path of (shell) commands. SYNOPSIS
which [options] [--] programname [...] DESCRIPTION
Which takes one or more arguments. For each of its arguments it prints to stdout the full path of the executables that would have been exe- cuted when this argument had been entered at the shell prompt. It does this by searching for an executable or script in the directories listed in the environment variable PATH using the same algorithm as bash(1). This man page is generated from the file which.texinfo. OPTIONS
--all, -a Print all matching executables in PATH, not just the first. --read-alias, -i Read aliases from stdin, reporting matching ones on stdout. This is useful in combination with using an alias for which itself. For example alias which='alias | which -i'. --skip-alias Ignore option `--read-alias', if any. This is useful to explicity search for normal binaries, while using the `--read-alias' option in an alias or function for which. --read-functions Read shell function definitions from stdin, reporting matching ones on stdout. This is useful in combination with using a shell func- tion for which itself. For example: which() { declare -f | which --read-functions $@ } export -f which --skip-functions Ignore option `--read-functions', if any. This is useful to explicity search for normal binaries, while using the `--read-functions' option in an alias or function for which. --skip-dot Skip directories in PATH that start with a dot. --skip-tilde Skip directories in PATH that start with a tilde and executables which reside in the HOME directory. --show-dot If a directory in PATH starts with a dot and a matching executable was found for that path, then print "./programname" rather than the full path. --show-tilde Output a tilde when a directory matches the HOME directory. This option is ignored when which is invoked as root. --tty-only Stop processing options on the right if not on tty. --version,-v,-V Print version information on standard output then exit successfully. --help Print usage information on standard output then exit successfully. RETURN VALUE
Which returns the number of failed arguments, or -1 when no `programname' was given. EXAMPLE
The recommended way to use this utility is by adding an alias (C shell) or shell function (Bourne shell) for which like the following: [ba]sh: which () { (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@ } export -f which [t]csh: alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' This will print the readable ~/ and ./ when starting which from your prompt, while still printing the full path when used from a script: > which q2 ~/bin/q2 > echo `which q2` /home/carlo/bin/q2 BUGS
The HOME directory is determined by looking for the HOME environment variable, which aborts when this variable doesn't exist. Which will consider two equivalent directories to be different when one of them contains a path with a symbolic link. AUTHOR
Carlo Wood <carlo@gnu.org> SEE ALSO
bash(1) WHICH(1)
All times are GMT -4. The time now is 02:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy