Operating System - HP-UX
1819792 Members
3030 Online
109607 Solutions
New Discussion юеВ

Problem when multiple SCP connections

 
Martello
New Member

Problem when multiple SCP connections

We have two HPUX servers (A & B) setup for sending files between them via SCP.

A= HP-UX sv294n B.11.31 U ia64 1492049262 unlimited-user license
B= HP-UX sv480 B.11.23 U ia64 0632649267 unlimited-user license

The keys/hosts configuration are set up between the two servers.
There's no problem when sending individual file between the two servers.

However, when we are standing multiple files "cocncurrently" via shell script or commands from server A to server B, we are getting the following messages repeatedly.
Some files got sent OK and some didn't go thru when the messages below appear, regardless of the size or type of these "unsent" files in server A :


:
:
ssh_exchange_identification: Connection closed by remote host
lost connection
ssh_exchange_identification: Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host
lost connection
ssh_exchange_identification: Connection closed by remote host
lost connection
lost connection
ssh_exchange_identification: Connection closed by remote host
lost connection
ssh_exchange_identification: Connection closed by remote host
lost connection
:
:


Any idea how I could trouble-shoot and resolve this issue ?


Thanks,
Graziano
8 REPLIES 8
Jupinder Bedi
Respected Contributor

Re: Problem when multiple SCP connections

you can restart your ssh daemon

cd /sbin/init.d

./secsh stop
./secsh start

and still you are facing the same issue than you can install the latest available patch of ssh
All things excellent are as difficult as they are rare
Steven E. Protter
Exalted Contributor

Re: Problem when multiple SCP connections

Shalom,

Check dmesg and /var/adm/syslog/syslog.log

I suspect network issues here.

lanamin -x 0

replace 0 with the number from your actual active LAN connection.

See lanscan for assistance in this.

If your connection is not full duplex, you will need to take steps, perhaps further lanadmin commands to get a full duplex connection.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Martello
New Member

Re: Problem when multiple SCP connections

Feb 10 14:52:31 sv480 sshd[950]: Received signal 15; terminating.
Feb 10 14:52:43 sv480 sshd[13460]: Server listening on :: port 22.
Feb 10 14:52:43 sv480 sshd[13460]: Server listening on 0.0.0.0 port 22.
Feb 10 14:50:00 sv480 su: + tty?? root-oracle
Feb 10 14:54:16 sv480 sshd[13519]: Accepted publickey for oracle from 10.1.230.81 port 57951 ssh2
Feb 10 14:54:16 sv480 sshd[13516]: Accepted publickey for oracle from 10.1.230.81 port 57948 ssh2
Feb 10 14:54:16 sv480 sshd[13517]: Accepted publickey for oracle from 10.1.230.81 port 57949 ssh2
Feb 10 14:54:16 sv480 sshd[13522]: Accepted publickey for oracle from 10.1.230.81 port 57955 ssh2
Feb 10 14:54:16 sv480 sshd[13523]: Accepted publickey for oracle from 10.1.230.81 port 57954 ssh2
Feb 10 14:54:16 sv480 sshd[13518]: Accepted publickey for oracle from 10.1.230.81 port 57950 ssh2
Feb 10 14:54:16 sv480 sshd[13521]: Accepted publickey for oracle from 10.1.230.81 port 57953 ssh2
Feb 10 14:54:16 sv480 sshd[13520]: Accepted publickey for oracle from 10.1.230.81 port 57952 ssh2
Feb 10 14:54:16 sv480 sshd[13515]: Accepted publickey for oracle from 10.1.230.81 port 57946 ssh2
Feb 10 14:54:16 sv480 sshd[13514]: Accepted publickey for oracle from 10.1.230.81 port 57947 ssh2

Some files got sent OK and some didn't go
Martello
New Member

Re: Problem when multiple SCP connections

sv480:/d00/oradata/PRDAVA02># lanadmin -x 1
Speed = 1000 Full-Duplex.
Autonegotiation = On.

Regards,
Graziano
Johnson Punniyalingam
Honored Contributor

Re: Problem when multiple SCP connections

couple things to check,

1) Network speed settings of both (A & B) Servers ?

lanadmin -x

2)maximum allowable ssh-connection?

check from sshd_config files of both servers.

3) folder permission of directories of (Server A & Server B) verse vise ?

4) also better if your script have debugging options (scp -v)
Problems are common to all, but attitude makes the difference
Martello
New Member

Re: Problem when multiple SCP connections

No Send:

Executing: program /opt/ssh/bin/ssh host SV480, user oracle, command scp -v -t /d00/oradata/PRDAVA02
OpenSSH_4.7p1+sftpfilecontrol-v1.2-hpn12v17, OpenSSL 0.9.7m 23 Feb 2007
HP-UX Secure Shell-A.04.70.023, HP-UX Secure Shell version
debug1: Reading configuration data /home/oratest/.ssh/config^M
debug1: Applying options for *^M
debug1: Reading configuration data /opt/ssh/etc/ssh_config^M
debug1: Connecting to SV480 [10.2.230.1] port 22.^M
debug1: Connection established.^M
debug1: identity file /home/oratest/.ssh/id_rsa type 1^M
debug1: identity file /home/oratest/.ssh/id_dsa type 2^M
ssh_exchange_identification: Connection closed by remote host^M
lost connection

Send:
Executing: program /opt/ssh/bin/ssh host SV480, user oracle, command scp -v -t /d00/oradata/PRDAVA02
OpenSSH_4.7p1+sftpfilecontrol-v1.2-hpn12v17, OpenSSL 0.9.7m 23 Feb 2007
HP-UX Secure Shell-A.04.70.023, HP-UX Secure Shell version
debug1: Reading configuration data /home/oratest/.ssh/config^M
debug1: Applying options for *^M
debug1: Reading configuration data /opt/ssh/etc/ssh_config^M
debug1: Connecting to SV480 [10.2.230.1] port 22.^M
debug1: Connection established.^M
debug1: identity file /home/oratest/.ssh/id_rsa type 1^M
debug1: identity file /home/oratest/.ssh/id_dsa type 2^M
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.2p1-hpn^M
debug1: match: OpenSSH_4.2p1-hpn pat OpenSSH*^M
debug1: Enabling compatibility mode for protocol 2.0^M
debug1: Local version string SSH-2.0-OpenSSH_4.7p1+sftpfilecontrol-v1.2-hpn12v17^M
debug1: SSH2_MSG_KEXINIT sent^M
debug1: SSH2_MSG_KEXINIT received^M
debug1: kex: server->client aes128-cbc hmac-md5 none^M
debug1: kex: client->server aes128-cbc hmac-md5 none^M
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent^M
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP^M
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent^M
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY^M
debug1: Host 'sv480' is known and matches the RSA host key.^M
debug1: Found key in /home/oratest/.ssh/known_hosts:16^M
debug1: ssh_rsa_verify: signature correct^M
debug1: SSH2_MSG_NEWKEYS sent^M
debug1: expecting SSH2_MSG_NEWKEYS^M
debug1: SSH2_MSG_NEWKEYS received^M
debug1: SSH2_MSG_SERVICE_REQUEST sent^M
debug1: SSH2_MSG_SERVICE_ACCEPT received^M
debug1: Authentications that can continue: publickey,password,keyboard-interactive^M
debug1: Next authentication method: publickey^M
debug1: Offering public key: /home/oratest/.ssh/id_rsa^M
debug1: Server accepts key: pkalg ssh-rsa blen 277^M
debug1: read PEM private key done: type RSA^M
debug1: Authentication succeeded (publickey).^M
debug1: Final hpn_buffer_size = 131072^M
debug1: channel 0: new [client-session]^M
debug1: Entering interactive session.^M
debug1: Sending command: scp -v -t /d00/oradata/PRDAVA02^M
Sending file modes: C0660 30828142592 i907.dbf
Sink: C0660 30828142592 i907.dbf
Martello
New Member

Re: Problem when multiple SCP connections

Solution

On host B I uncommented MaxStartups in /etc/ssh/sshd_config and set it to 100

Regards,
Graziano
Viktor Balogh
Honored Contributor

Re: Problem when multiple SCP connections

>However, when we are standing multiple files "cocncurrently" via shell script

The output seems as if you transmit files with a for loop. If the files reside under a single folder the you can try "scp -r" for recusrive transmission... No need for a "for loop" here. And maybe, there's also no need for bumping the MaxStartups parameter of ssh.
****
Unix operates with beer.