Perl SFTP password authentication issues using Net::SFTP::Foreign. Pyt error. permission deny

点点圈 提交于 2020-01-02 21:02:54

问题


I'm using Net::FTP::Foreign with password authentication. and I get error about pty and permission error. firstly, cannot connect to pty slave. secondly, Foreign seems not use password authentication mode. IO:Pty is installed. the machine is solaris.

Code:
my %args = (password => 'pwd', user => 'usr', port => 22, more => '-v');
log->info("Starting SFTP...\n");
my $sftp = Net::SFTP::Foreign->new($O->{sftp_server}, %args);

is there any wrong with my script or any configuration issue on my server.

thanks

Log:

warning: TIOCSCTTY failed, slave might not be set as controlling terminal: Inappropriate ioctl for device at /usr/pkgs/Export/US/SunOS5.10_i86pc/lib/perl5/CPAN/i86pc-solaris/IO/Pty.pm line 121. Error: could not connect pty as controlling terminal! ssh: tty: node name or service name not known Uncaught exception from user code: Unable to establish SFTP connection: SSH slave exited unexpectedly with error code 255 at /usr/pkgs/Export/OPS/SunOS5.10_i86pc/cbin/mkt_daily_new_issue_download.pl line 162 at /usr/pkgs/Export/US/SunOS5.10_i86pc/lib/perl5/CPAN/Net/SFTP/Foreign/Common.pm line 103 Net::SFTP::Foreign::Common::die_on_error('Net::SFTP::Foreign=HASH(0x84cfa78)', 'Unable to establish SFTP connection') called at /usr/pkgs/Export/OPS/SunOS5.10_i86pc/cbin/mkt_daily_new_issue_download.pl line 162

来源:https://stackoverflow.com/questions/21087991/perl-sftp-password-authentication-issues-using-netsftpforeign-pyt-error-pe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!