Article ID: 116454, created on Jul 16, 2013, last review on May 20, 2014

  • Applies to:
  • Business Automation 5.4


The pba_migrate script fails to connect to servers with the error messages provided below:

[0s] [DEBUG] [SSH::Connection] Init SSH using password authentification
[1m 21s] [DIE] [SSH::Connection] Error while init transport: Connection closed by remote host. at /usr/share/perl5/vendor_perl/Net/SSH/Perl/ line 143


[0s] [DEBUG] [SSH::Connection] Init SSH using password authentification
[3m 0s] [DIE] [SSH::Connection] Error while init transport: timeout at /usr/local/bm/tools/mig2rh6/ line 136.


The problem lies in the Net::SSH::Perl module which fails to generate random data for securing a connection in a timely fashion; see the following thread on Perl website for more details -


1) Make sure the Math::BigInt::GMP Perl module is installed on the server where the migration script is being executed:

[root@pba-migration pba-migration]# rpm -qa | grep GMP

2) Make sure /dev/random produces random data with enough speed.

For example, this is a bad behavior (the command hangs and is interrupted by pressing Ctrl-C):

[root@pba-migration pba-migration]# dd if=/dev/random of=/tmp/rnd bs=1024 count=10
^C0+2 records in
0+2 records out
28 bytes (28 B) copied, 209.539 s, 0.0 kB/s

And this is a good one (executes instantly):

[root@pba-migration pba-migration]# dd if=/dev/random of=/tmp/rnd bs=1024 count=10
0+10 records in
0+10 records out
1197 bytes (1.2 kB) copied, 0.000892964 s, 1.3 MB/s

You can fix /dev/random by enabling the *rngd *daemon. It may complain about kernel modules:

[root@pba-migration pba-migration]# /etc/init.d/rngd start
Starting rngd: can't open entropy source(tpm or intel/amd rng)
Maybe RNG device modules are not loaded             [FAILED]

If this happens, you can configure it to use /dev/urandom - put the following lines in the /etc/sysconfig/rngd file:

# Add extra options here
EXTRAOPTIONS="-r /dev/urandom"

Note: If /dev/random shows bad behavior inside Parallels Virtuozzo Container, the issue should be fixed on the hardware node, not inside the container.

Search Words


Connection closed by remote host

Error while init transport

Issue during migration of pba containers

210d017ddc3a076d22f0f865b1cf0730 caea8340e2d186a540518d08602aa065 198398b282069eaf2d94a6af87dcb3ff 92711db0799e8aefe8e51f12dace0496 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF