Recursive Directory Transfer from Between Servers?


Author
Message
Pragma Tech Rep
Pragma Tech Rep
Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)
Group: Forum Members
Posts: 4, Visits: 12
try this as deltree is in the same directory where ssh.exe is located:

%SSHPATH%\deltree -F TEST

or more fully

%SSHPATH%\ssh.exe -A password username@255.255.255.255 "\program files\pragma\clients\deltree -F TEST"

You should also try to put "\program files\pragma\clients"n directory in the system environment "path"  variable. deltree.exe and ssh.exe are all copied there during install of our software.
tlockhart
tlockhart
Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)
Group: Forum Members
Posts: 11, Visits: 36
I tried the following at the command line, and it worked, but it does not work in my test script(see below).

%SSHPATH%\ssh.exe -A password username@255.255.255.255

cd C:
cd C:\sample_data
deltree -F TEST
mkdir TEST

I don't believe my script is waiting until after I login to the SSH Session before it continues execution.  I am receiving the following error, before the ssh session opens.  Can anyone advise?

008:ERROR: %SSHPATH%\ssh.exe deltree -F is an unsupported command
Technical Support Group...
Technical Support Group (TSG)
Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)Pragmateer (1.2K reputation)
Group: Moderators
Posts: 136, Visits: 639
Try the following:

ssh -l username -A password remotehost

 

Thank you,

Technical Support Group (TSG)
Pragma Systems, Inc.


Pragma Systems Technical Support
13809 Research Blvd, #675
Austin, TX 78750
http://www.pragmasys.com
tlockhart
tlockhart
Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)
Group: Forum Members
Posts: 11, Visits: 36
That worked, but since this is a batch job.  I need the ability to login to SSH with userid and password.  Is there a way to login with the userid and password, and avoid the pasword prompt?
Pragma Tech Rep
Pragma Tech Rep
Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)
Group: Forum Members
Posts: 4, Visits: 12
yes, use ssh shell command access and deltree -F in Windows hosts and "rm -rf" command to Linix/unix hosts.

ssh id@remotehost deltree -F dirtodelete      ; for Windows hosts

ssh id@remotehost rm -rf dirtodelete            ; for Linux/Unix hosts
tlockhart
tlockhart
Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)
Group: Forum Members
Posts: 11, Visits: 36
Thanks Ken!

Is there a way to delete the directory from the remote server, after it has been transfered to the local server (NOTE: The directories will contain files and other directories)? I don't believe deltree will work for this task.  Do you have any suggestions?
Ken
Ken
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)
Group: Forum Members
Posts: 1, Visits: 9
Yes, it can be done with the built in scp server and scp client.

Use the scp command with -r recursive directiory copying feature and -p for keeping original date&time.

E.g.

scp -pr remotemachine:c:/srcdirectory .

// this will copy remotemachine's c:/srcdirectory and all its subdirectories and files to the current directory

// from where this command is issued. -p keeps the original files time and date.

scp -pr ken@remotemachine:mydir newdir

// thiis will login as ken and copy "mydir" from the homedirectory to "newdir"
tlockhart
tlockhart
Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)Supreme Being (95 reputation)
Group: Forum Members
Posts: 11, Visits: 36
Is it possible in FortressSSH Enterprise  Version 5.0 to transfer directories between servers?  This is similar to the way mget and mput can transfer files, but I need to transfer a whole directory structure, including files.  Any assistance would be greatly appreciated.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search