View | Details | Raw Unified | Return to bug 35724
Collapse All | Expand All

(-)a/Koha/Edifact/Transport.pm (-1 / +4 lines)
Lines 136-145 sub sftp_download { Link Here
136
    # C = ready to retrieve E = Edifact
136
    # C = ready to retrieve E = Edifact
137
    my $msg_hash = $self->message_hash();
137
    my $msg_hash = $self->message_hash();
138
    my @downloaded_files;
138
    my @downloaded_files;
139
    my $port = $self->{account}->{port} ? $self->{account}->{port} : '22';
139
    my $sftp = Net::SFTP::Foreign->new(
140
    my $sftp = Net::SFTP::Foreign->new(
140
        host     => $self->{account}->host,
141
        host     => $self->{account}->host,
141
        user     => $self->{account}->username,
142
        user     => $self->{account}->username,
142
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
143
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
144
        port     => $port,
143
        timeout  => 10,
145
        timeout  => 10,
144
    );
146
    );
145
    if ( $sftp->error ) {
147
    if ( $sftp->error ) {
Lines 293-302 sub ftp_upload { Link Here
293
295
294
sub sftp_upload {
296
sub sftp_upload {
295
    my ( $self, @messages ) = @_;
297
    my ( $self, @messages ) = @_;
298
    my $port = $self->{account}->{port} ? $self->{account}->{port} : '22';
296
    my $sftp = Net::SFTP::Foreign->new(
299
    my $sftp = Net::SFTP::Foreign->new(
297
        host     => $self->{account}->host,
300
        host     => $self->{account}->host,
298
        user     => $self->{account}->username,
301
        user     => $self->{account}->username,
299
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
302
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
303
        port     => $port,
300
        timeout  => 10,
304
        timeout  => 10,
301
    );
305
    );
302
    $sftp->die_on_error("Cannot ssh to $self->{account}->host");
306
    $sftp->die_on_error("Cannot ssh to $self->{account}->host");
303
- 

Return to bug 35724