Sponsored Content
Special Forums Cybersecurity automatic SCP transfers issues Post 302433971 by Dird on Thursday 1st of July 2010 03:51:56 AM
Old 07-01-2010
automatic SCP transfers issues

Hi,

I'm trying to set up scp but it isn't as nice as WinSCP. My requirement is to transfer a file from one machine to another with scp. This would run in a .ksh so it would need to avoid prompts (password/are you sure). First I tried this with v2: SSH with Keys HOWTO: SSH with Keys in a console window
Then I tried this: ssh-keygen: password-less SSH login

I moved the .pubs to the server I wanted to connect to and cat'd them to the authorized_keys & authorized_keys2 files but it doesn't work. I get the following error:
Code:
debug1: Connection established.
debug1: identity file /home/oracle/.ssh/identity type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
Protocol major versions differ: 1 vs. 2

Anyone able to help or has a good simple to follow guide? The scp should overwrite any file with the same name. Thanks for help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automatic transfering of files using scp

I'm in the process of writing a shell script with copies files from one linux box to another using scp. I wish to run this through a cronjob so it cannot be interactive. This is what I have so far. #!/bin/sh PASSWD='passswd' dateset=$( date | awk '{print $2 $3 $6}') for dates in $dateset;... (1 Reply)
Discussion started by: tcruicksh
1 Replies

2. UNIX for Dummies Questions & Answers

History of old FTP transfers

How can one find the name and size of files ftp'ed during an old ftp transfer. Is there any log where these details are stored or any UNIX command which can provide these details. Thanks in advance. (4 Replies)
Discussion started by: Nakul Mukerjee
4 Replies

3. UNIX for Dummies Questions & Answers

probloem in scp command 99% content only transfers

hi every one.. i am new to working in unix environment.. i have a problem in transferring files using scp command.. i am transferring files using scp command on one unix manchine to another unix machine.. the syntax is scp -r sourcedirectory destination directory The files in sourcedirectory... (1 Reply)
Discussion started by: GovindGembali
1 Replies

4. Shell Programming and Scripting

automatic scp download (without the use of ssh keys)

Hi guys, I need to automate scp downloads from a server to which I do not have the ability to upload my public key for automatic logins. I know there is something called expect, but I wasn't sure if that was the best way to go. Basically I am executing a scp download command and I need the... (2 Replies)
Discussion started by: caprica13
2 Replies

5. UNIX for Advanced & Expert Users

ssh - transfers with gateway hopping

Hi, I am having trouble transferring files from a source UNIX machine to a destination UNIX machine by hopping via 2 gateway machines. The user used for the transfer has been setup/authorized so no password is required to login. Summerized: source to gateway1 to gateway2 to destination ... (2 Replies)
Discussion started by: Solarius
2 Replies

6. Shell Programming and Scripting

For loop scp transfers check if all iterations successful

All, I am using a for loop to SCP a bunch of files in a directory. I am having it then drop a .ready file name. Is there a way to check for the success of all iterations and then email upon fail or success? Example of part of my script: for file in $ORIGLOC/* do ] &&... (2 Replies)
Discussion started by: markdjones82
2 Replies

7. Programming

Automatic SFTP transfers using OpenSSH on Windows and C#

I would like to create console application in c# to automate the process of downloading some files from a SFTP server to my local hard drive at a set time each week/day. SFTP Server installed OpenSSH for windows and client machine also. Any ideas how I could do such a task? or sample code. ... (0 Replies)
Discussion started by: sufiiyan
0 Replies

8. UNIX for Dummies Questions & Answers

Does SCP return an error code for network issues

Hello everyone, In a script, I am using SCP to copy huge file to another host. scp -qrp hugefile.txt /opt/perf05/tmp However, we have noticed that this file is not being copied. I am suspecting this was because we are losing connection while copying this... (1 Reply)
Discussion started by: qwarentine
1 Replies

9. Shell Programming and Scripting

Scp/Rsync transfers stopped working?

Hi all, I have a backup script from my work computer to my home computer for my research for multiple reasons. It's a simple rsync script, with about 5 gigs of data. (Obviously with rsync it doesn't transfer 5 GB every time.). Recently, it has stopped working, scp also doesn't work, it simply... (1 Reply)
Discussion started by: corrado33
1 Replies

10. Shell Programming and Scripting

Automatic scp Script

I need a script to automatically scp the latest files on DIR1,DIR2 and DIR3 from Source to destination server at same place(DIR1,DIR2 and DIR3) . Further details are: Source Server (192.168.1.5) DIR1 DIR2 DIR3 Destination Server (192.168.1.10) DIR1 DIR2 DIR3 (7 Replies)
Discussion started by: refra
7 Replies
Net::OpenSSH::Compat::Perl(3pm) 			User Contributed Perl Documentation			   Net::OpenSSH::Compat::Perl(3pm)

NAME
Net::OpenSSH::Compat::Perl - Net::OpenSSH adapter for Net::SSH::Perl API compatibility SYNOPSIS
use Net::OpenSSH::Compat::Perl qw(:supplant); use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new('host'); $ssh->login($user, $passwd); my ($out, $err, $rc) = $ssh->cmd($cmd); DESCRIPTION
This module implements a subset of Net::SSH::Perl API on top of Net::OpenSSH. After the module is loaded as... use Net::OpenSSH::Compat::Perl qw(:supplant); ... it supplants the Net::SSH::Perl module as if it were installed on the machine using Net::OpenSSH under the hood to handle SSH operations. Setting defaults The hash %Net::OpenSSH::Compat::Perl::DEFAULTS can be used to set default values for Net::OpenSSH and other modules called under the hood and otherwise not accesible through the Net::SSH::Perl API. The entries currently supported are: connection => [ %opts ] Extra options passed to "Net::OpenSSH::new" constructor. Example: $Net::OpenSSH::Compat::SSH::Perl::DEFAULTS{connection} = [ ssh_path => "/opt/SSH/bin/ssh" ]; BUGS AND SUPPORT
This is a work in progress. "register_handler" method is not supported. Net::SSH::Perl submodules (i.e. Net::SSH::Perl::Channel) are not emulated. Anyway, if your Net::SSH::Perl script fails, fill a bug report at the CPAN RT bugtracker (https://rt.cpan.org/Ticket/Create.html?Queue=Net-OpenSSH-Compat <https://rt.cpan.org/Ticket/Create.html?Queue=Net-OpenSSH-Compat>) or just send me an e-mail with the details. Include at least: 1 - The full source of the script 2 - A description of what happens in your machine 3 - What you thing it should be happening 4 - What happens when you use the real Net::SSH::Perl 5 - The version and name of your operating system 6 - The version of the OpenSSH ssh client installed on your machine ("ssh -V") 7 - The Perl version ("perl -V") 8 - The versions of the Perl packages Net::OpenSSH, IO::Pty and this Net::OpenSSH::Compat. Git repository The source code repository is at https://github.com/salva/p5-Net-OpenSSH-Compat <https://github.com/salva/p5-Net-OpenSSH-Compat>. My wishlist If you like this module and you're feeling generous, take a look at my Amazon Wish List: <http://amzn.com/w/1WU1P6IR5QZ42> Also consider contributing to the OpenSSH project this module builds upon: <http://www.openssh.org/donations.html>. COPYRIGHT AND LICENSE
Copyright (C) 2011 by Salvador Fandin~o (sfandino@yahoo.com) This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-02-24 Net::OpenSSH::Compat::Perl(3pm)
All times are GMT -4. The time now is 08:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy