Secure upload without account in remote server (scp)
I'm looking for some way to build a certain script.

* There is some (Linux) users A, B and C who scan images to $HOME/images/scan
* They should upload those pics to the remote server where they don't have accounts.
* Therefore is virtual user X, who has account on local and remote machine, but who has no direct access to user's home directories. 
* They all have common group "images" and user's scan-directory is readable for this group.

So i want to find a way, how users could run a script which uploads pics to remote server using X permissions and account on remote server. I made a rsa-key for that and it is added to remote server authorized keys file. **For user X everything works.**

I tried some setgid/setuid perl-scripts, but they can't run scp in user X rights and they don't use it's rsa-key either. Something like this example:

    #!/usr/bin/perl
    
    use strict;
    use warnings;
    use Net::SCP qw( scp iscp );
    my $scp = Net::SCP -> new( '192.168.1.3', 'X' );
    $scp->put( 'file.jpg' ) or die $scp->{errstr};

So I'm looking for other ways to satisfy my needs.

Thank you in advance!

Kõike hääd, <br />
WK
Secure upload without account in remote server (scp)
===

I'm looking for some way to build a certain script.

* There is some (Linux) users A, B and C who scan images to $HOME/images/scan
* They should upload those pics to the remote server where they don't have accounts.
* Therefore is virtual user X, who has account on local and remote machine, but who has no direct access to user's home directories. 
* They all have common group "images" and user's scan-directory is readable for this group.

So i want to find a way, how users could run a script which uploads pics to remote server using X permissions and account on remote server. I made a rsa-key for that and it is added to remote server authorized keys file. **For user X everything works.**

I tried some setgid/setuid perl-scripts, but they can't run scp in user X rights and they don't use it's rsa-key either. Something like this example:

    #!/usr/bin/perl
    
    use strict;
    use warnings;
    use Net::SCP qw( scp iscp );
    my $scp = Net::SCP -> new( '192.168.1.3', 'X' );
    $scp->put( 'file.jpg' ) or die $scp->{errstr};

So I'm looking for other ways to satisfy my needs.

Thank you in advance!

Kõike hääd, <br />
WK