我无法使用Net::SFTP连接到远程服务器。我之前在另一台机器上成功运行了相同的脚本,但是,我现在收到以下错误:
[root@script-server fmzbih_cms_weather_updater]# ./fmzbih_cms_forecast.pl
script-server.bih.net.ba: Reading configuration data /root/.ssh/config
script-server.bih.net.ba: Reading configuration data /etc/ssh_config
script-server.bih.net.ba: Allocated local port 1023.
script-server.bih.net.ba: Connecting to 10.100.4.193, port 22.
script-server.bih.net.ba: Remote protocol version ., remote software version
script-server.bih.net.ba: Net::SSH::Perl Version 1.34, protocol version 1.5.
script-server.bih.net.ba: No compat match: .
script-server.bih.net.ba: Connection established.
Can't locate object method "_session_channel" via package "Net::SSH::Perl::SSH1" at /usr/local/lib/perl5/site_perl/5.14.2/Net/SFTP.pm line 78.
这可能是因为使用了 SSH1,如日志中所示?SFTP不应该使用SSH2吗?