06-21-2006
SSH2 help !!!!
Hi,
I need to implement sftp between server 1 and server2.
I have already generated the public key using account user1 on server 1 and and sent it to the administrator of server2.
I have also finished updating the identification file at /home/user1/.ssh2
I have an account created user2 which I should use when connecting to server2. However, when I am using the following command to connect to server2, I get the messages below:
>ssh -v user2@server2
debug: Connecting to user2@server2, port 22... (SOCKS not used)
warning: Connecting to user2@server2 failed: No address associated to the name
Any clues what I should do from here, please.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to set up a secure and trusted connection between 2 boxes running solaris using ssh2.
I've run ssh-keygen2 on the local box and on the remote box, created the identification file ( IdKey id_dsa_2048_a ) on the local machine and copied across the public key file from the local to... (5 Replies)
Discussion started by: PaulC
5 Replies
2. Shell Programming and Scripting
hi,
i am getting error while executing the follwoing command.
/usr/local/bin/ssh2 user@hostname find /test/DeleteFile -mtime +10 -exec rm {} \;
error is :
find: 0652-018 An expression term lacks a required parameter.
it is deleting the files from the specified location. it is working... (2 Replies)
Discussion started by: Sunil Rajput
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I need to implement sftp between server 1 and server2.
I have already generated the public key using account user1 on server 1 and and sent it to the administrator of server2.
I have also finished updating the identification file at /home/user1/.ssh2
I have an account created... (11 Replies)
Discussion started by: tansha
11 Replies
4. UNIX for Advanced & Expert Users
Hi Can anyone help resolving the issue here?
I am trying to connect from one unix server(ssh2) to another unix server using (Openssh).
I converted the public key from ssh2 to openssh format and uploaded it. Yet it is asking for a password to connect.
Here is the debug info:
... (0 Replies)
Discussion started by: jazjit
0 Replies
5. Cybersecurity
I have openssh identity and identity.pub which work well on many machines to uniquely identify myself.
I want to put these on a host (Tru64) using ssh2. I can convert the public key to ssh2 format using "ssh-keygen -e" on an openssh box.
How should I convert the private key? (2 Replies)
Discussion started by: porter
2 Replies
6. UNIX for Dummies Questions & Answers
upon entering the command:ssh -v
I get this:OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006
how do i identify whether or not i have ssh1 or ssh2?
thanks in advance (10 Replies)
Discussion started by: EWTGPAC
10 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I was trying to run ssh2 command in background... but i got follwoing error message saying that process has been stopped..
+ Stopped(SIGTTOU)
Anyone have any idea about this??? Appreciated your help.. (3 Replies)
Discussion started by: pvamsikr
3 Replies
8. Shell Programming and Scripting
I have Windows server setups consisting two servers to work on.
I have to run a batch file on server 2 (say, Batch2) by running a batch file on server 1 (Say, Batch1).
We have Tectia SSH server-client setup.
Could anyone please tell the script/code for Batch1? (1 Reply)
Discussion started by: sakha83
1 Replies
9. Solaris
Hi,
Earlier, I have configured SFTP successfully in my prev jobs.
This time I have to configure SFTP for local server (uses SSH2) and remote server (uses SSH).
I tried to search the forum. I did not find the right thread.
I appreciate your help.
The following is the additional info
>... (5 Replies)
Discussion started by: bobbygsk
5 Replies
10. Shell Programming and Scripting
Hello Everyone,
I have the following codes that only works for the first login element. I can't get it work with the second and third login credentials. Can anyone here see the problem?
I ran the code with host1, it works as expect. see below:
# ./test.pl host1
Trying to connect... (3 Replies)
Discussion started by: tqlam
3 Replies
LEARN ABOUT DEBIAN
test::tcp
Test::TCP(3pm) User Contributed Perl Documentation Test::TCP(3pm)
NAME
Test::TCP - testing TCP program
SYNOPSIS
use Test::TCP;
my $server = Test::TCP->new(
code => sub {
my $port = shift;
...
},
);
my $client = MyClient->new(host => '127.0.0.1', port => $server->port);
undef $server; # kill child process on DESTROY
Using memcached:
use Test::TCP;
my $memcached = Test::TCP->new(
code => sub {
my $port = shift;
exec $bin, '-p' => $port;
die "cannot execute $bin: $!";
},
);
my $memd = Cache::Memcached->new({servers => ['127.0.0.1:' . $memcached->port]});
...
And functional interface is available:
use Test::TCP;
test_tcp(
client => sub {
my ($port, $server_pid) = @_;
# send request to the server
},
server => sub {
my $port = shift;
# run server
},
);
DESCRIPTION
Test::TCP is test utilities for TCP/IP programs.
METHODS
empty_port
my $port = empty_port();
Get the available port number, you can use.
test_tcp
Functional interface.
test_tcp(
client => sub {
my $port = shift;
# send request to the server
},
server => sub {
my $port = shift;
# run server
},
# optional
port => 8080
);
wait_port
wait_port(8080);
Waits for a particular port is available for connect.
OO-ish interface
my $server = Test::TCP->new(%args);
Create new instance of Test::TCP.
Arguments are following:
$args{auto_start}: Boolean
Call "$server->start()" after create instance.
Default: true
$args{code}: CodeRef
The callback function. Argument for callback function is: "$code->($pid)".
This parameter is required.
$server->start()
Start the server process. Normally, you don't need to call this method.
$server->stop()
Stop the server process.
my $pid = $server->pid();
Get the pid of child process.
my $port = $server->port();
Get the port number of child process.
FAQ
How to invoke two servers?
You can call test_tcp() twice!
test_tcp(
client => sub {
my $port1 = shift;
test_tcp(
client => sub {
my $port2 = shift;
# some client code here
},
server => sub {
my $port2 = shift;
# some server2 code here
},
);
},
server => sub {
my $port1 = shift;
# some server1 code here
},
);
Or use OO-ish interface instead.
my $server1 = Test::TCP->new(code => sub {
my $port1 = shift;
...
});
my $server2 = Test::TCP->new(code => sub {
my $port2 = shift;
...
});
# your client code here.
...
How do you test server program written in other languages like memcached?
You can use "exec()" in child process.
use strict;
use warnings;
use utf8;
use Test::More;
use Test::TCP 1.08;
use File::Which;
my $bin = scalar which 'memcached';
plan skip_all => 'memcached binary is not found' unless defined $bin;
my $memcached = Test::TCP->new(
code => sub {
my $port = shift;
exec $bin, '-p' => $port;
die "cannot execute $bin: $!";
},
);
use Cache::Memcached;
my $memd = Cache::Memcached->new({servers => ['127.0.0.1:' . $memcached->port]});
$memd->set(foo => 'bar');
is $memd->get('foo'), 'bar';
done_testing;
AUTHOR
Tokuhiro Matsuno <tokuhirom@gmail.com>
THANKS TO
kazuhooku
dragon3
charsbar
Tatsuhiko Miyagawa
lestrrat
SEE ALSO
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-01 Test::TCP(3pm)