Click here to get back home

Selected cipher type not supported by server

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Selected cipher type not supported by server lovecreatesbea...@gmail.com 05-08-2008
Posted by lovecreatesbea...@gmail.com on May 8, 2008, 6:50 am
Please log in for more thread options
Hi,

I'm getting "Selected cipher type not supported by server" error on
this line

$cnn = Net::SSH::Perl->new($host);

The error occurs even when I specify all IDEA, DES, DES3, Blowfish,
arcfour, blowfish-cbc, and 3des-cbc like this:

$cnn = Net::SSH::Perl->new($host, cipher => "IDEA");

in the following script. How can I correct this?


Thank you for your time.



#!/usr/bin/perl

use Net::SSH::Perl;
my ($host, $user, $pass, $mgrip, $rpwd, $prmpt, $tmout, $line);
$host = $ARGV[0];
$user = $ARGV[1];
$pass = $ARGV[2];
$mgrip = $ARGV[3];
$rpwd = $ARGV[4];
$prmpt = '/[$%#>] ?$/';
$tmout = 2;

$cnn = Net::SSH::Perl->new($host);
$cnn->login($user, $pass);
#$cnn->print("/bin/su -");
#$cnn->waitfor('/password: ?$/i');
#$cnn->print($rpwd);
#$cnn->prompt('/# $/');
#$cnn->waitfor($cnn->prompt);
#@line = $cnn->cmd("/usr/sbin/dasnmp -a $mgrip");
@line = $cnn->cmd("ls /");
print "@line\n";

Posted by lovecreatesbea...@gmail.com on May 8, 2008, 6:59 am
Please log in for more thread options
On May 8, 6:50=A0pm, "lovecreatesbea...@gmail.com"
> Hi,
>
> I'm getting "Selected cipher type =A0not supported by server" error on
> this line
>
> =A0 =A0 $cnn =3D Net::SSH::Perl->new($host);
>
> The error occurs even when I specify all IDEA, DES, DES3, Blowfish,
> arcfour, blowfish-cbc, and 3des-cbc like this:
>
> =A0 =A0 $cnn =3D Net::SSH::Perl->new($host, cipher =3D> "IDEA");
>
> in the following script. How can I correct this?
>
> Thank you for your time.
>
> #!/usr/bin/perl
>
> use Net::SSH::Perl;
> my ($host, $user, $pass, $mgrip, $rpwd, $prmpt, $tmout, $line);
> $host =A0 =3D $ARGV[0];
> $user =A0 =3D $ARGV[1];
> $pass =A0 =3D $ARGV[2];
> $mgrip =A0=3D $ARGV[3];
> $rpwd =A0 =3D $ARGV[4];
> $prmpt =A0=3D '/[$%#>] ?$/';
> $tmout =A0=3D 2;
>
> $cnn =3D Net::SSH::Perl->new($host);
> $cnn->login($user, $pass);
> #$cnn->print("/bin/su -");
> #$cnn->waitfor('/password: ?$/i');
> #$cnn->print($rpwd);
> #$cnn->prompt('/# $/');
> #$cnn->waitfor($cnn->prompt);
> #@line =3D $cnn->cmd("/usr/sbin/dasnmp -a $mgrip");
> @line =3D $cnn->cmd("ls /");
> print "@line\n";

And these commented lines,

#$cnn->print("/bin/su -");
#$cnn->waitfor('/password: ?$/i');
#$cnn->print($rpwd);
#$cnn->prompt('/# $/');
#$cnn->waitfor($cnn->prompt);
#@line =3D $cnn->cmd("/usr/sbin/dasnmp -a $mgrip");

I used them to perform su root when the cnn was an telnet connection.
The print, waitfor and prompt come from telnet can not be used in ssh
connection in my code.

How can I su root in ssh connection?

Posted by Dr.Ruud on May 8, 2008, 10:19 am
Please log in for more thread options
lovecreatesbea...@gmail.com schreef:

> #!/usr/bin/perl

Missing:
use strict;
use warnings;


> use Net::SSH::Perl;
> my ($host, $user, $pass, $mgrip, $rpwd, $prmpt, $tmout, $line);
> $host = $ARGV[0];
> $user = $ARGV[1];
> $pass = $ARGV[2];
> $mgrip = $ARGV[3];
> $rpwd = $ARGV[4];
> $prmpt = '/[$%#>] ?$/';
> $tmout = 2;

You can write that as:

my ($host, $user, $pass, $mgrip, $rpwd) = @ARGV;
my $prmpt = qr/[$%#>] ?$/;
my $tmout = 2;

I don't see $prmpt nor $line used anywhere.

--
Affijn, Ruud

"Gewoon is een tijger."

Posted by smallpond on May 8, 2008, 11:09 am
Please log in for more thread options
lovecreatesbea...@gmail.com wrote:
> Hi,
>
> I'm getting "Selected cipher type not supported by server" error on
> this line
>
> $cnn = Net::SSH::Perl->new($host);
>

Are you tring to connect to an SSH-1 or SSH-2 host?
If not sure, report the error(s) you get from trying each.
--S
** Posted from http://www.teranews.com **

Posted by lovecreatesbea...@gmail.com on May 8, 2008, 11:42 pm
Please log in for more thread options
> lovecreatesbea...@gmail.com wrote:
> > Hi,
>
> > I'm getting "Selected cipher type =A0not supported by server" error on
> > this line
>
> > =A0 =A0 $cnn =3D Net::SSH::Perl->new($host);
>
> Are you tring to connect to an SSH-1 or SSH-2 host?
> If not sure, report the error(s) you get from trying each.

Hi, Thank you.

I tried the following ciphers one by one and got the same error
message: "Selected cipher type not supported by server Options ".

>> The error occurs even when I specify all IDEA, DES, DES3, Blowfish,
>> arcfour, blowfish-cbc, and 3des-cbc like this:

>> $cnn =3D Net::SSH::Perl->new($host, cipher =3D> "IDEA");


I manually ssh login the host and check the version. Is OpenSSH_4.6p1
an SSH1 or SSH2 implementation, or both?

root@bx1200:/etc/ssh# ssh -V
OpenSSH_4.6p1, OpenSSL 0.9.8d 28 Sep 2006
root@bx1200:/etc/ssh#

root user ssh login is enabled defaultly, right? So I don't su root,
do I?

The Cipher lines in ssh_config file are commented out as following.
How can know its cipher settings?

root@bx1200:/etc/ssh# grep Cipher ssh_config
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-
cbc,arcfour,aes192-cbc,aes256-cbc
root@bx1200:/etc/ssh#

[ Do I need to in my perl script issue "ssh -c <cipher_spec>" command
before ...? Absolutely not! I am not ssh-connected with the host. What
can I do? ]

Similar ThreadsPosted
Crypt::CBC vs individual cipher module differs? March 2, 2008, 7:01 pm
Padding Problem with Blowfish and Crypt::CBC and Java Cipher August 12, 2005, 4:21 pm
LWP::Simple Protocol scheme not supported March 1, 2006, 7:52 am
number of maximum decimal places supported with Perl July 22, 2008, 7:17 pm
removing selected lines June 16, 2005, 2:31 am
FAQ 4.34 How do I extract selected columns from a string? May 10, 2005, 11:03 pm
FAQ 4.34 How do I extract selected columns from a string? January 22, 2005, 12:03 pm
Peeking at the currently selected option in Tk::Optionmenu July 19, 2005, 3:46 am
FAQ 4.34 How do I extract selected columns from a string? July 26, 2005, 10:03 am
FAQ 4.34 How do I extract selected columns from a string? October 4, 2005, 10:03 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap