Leser: 5
7 Einträge, 1 Seite |
Gast+2009-01-30 14:29:17--ssh -F <homedir>/ssh_config <user@hostname> mache, klappt die Verbindung.
Quote-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config.
Quote$ssh->config
Returns the Net::SSH::Perl::Config object managing the configuration data for this SSH object. This is constructed from data passed in to the constructor new (see above), merged with data read from the user and system configuration files.
1
2
my $user_config = delete $arg{user_config} || "$ENV{HOME}/.ssh/config";
my $sys_config = delete $arg{sys_config} || "/etc/ssh_config";
Can't write to /etc/ssh_known_hosts: Permission denied at /usr/local/perl/5.8.6/lib/site_perl/5.8.6/Net/SSH/Perl.pm line 372
1
2
3
4
5
my $sshConf = Net::SSH::Perl::Config->new("1.1.1.1", options => [ ]);
my $hostKey = $sshConf->set("user_known_hosts", "/home/jz/.ssh/ssh_known_hosts");
$sshConf->read_config( '/home/jz/.ssh/config' );
my $ssh = Net::SSH::Perl->new("1.1.1.1");
my $cfg = $ssh->config();
1
2
3
4
5
my $ssh = Net::SSH::Perl->new("1.1.1.1");
my $cfg = $ssh->config(); # holt erst einmal lokale und globale Konfig
my $hostKey = $cfg->set("user_known_hosts", "/home/jz/.ssh/ssh_known_hosts"); # setzt eigene user_known_hosts
$cfg->read_config( '/home/jz/.ssh/config' ); # liest eigene config ein
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
adeccmas: Reading configuration data /home/jz/.ssh/config
adeccmas: Reading configuration data /etc/ssh_config
adeccmas: Connecting to 1.1.1.1, port 22.
adeccmas: Remote protocol version 2.0, remote software version OpenSSH_5.0
adeccmas: Net::SSH::Perl Version 1.32, protocol version 2.0.
adeccmas: No compat match: OpenSSH_5.0.
adeccmas: Connection established.
adeccmas: Sent key-exchange init (KEXINIT), wait response.
adeccmas: Algorithms, c->s: blowfish-cbc hmac-sha1 none
adeccmas: Algorithms, s->c: blowfish-cbc hmac-sha1 none
adeccmas: Entering Diffie-Hellman Group 1 key exchange.
adeccmas: Sent DH public key, waiting for reply.
adeccmas: Received host key, type 'ssh-dss'.
adeccmas: Permanently added '1.1.1.1' to the list of known hosts.
Can't write to /etc/ssh_known_hosts: Permission denied at /usr/local/perl/5.8.6/lib/site_perl/5.8.6/Net/SSH/Perl.pm line 372
7 Einträge, 1 Seite |