Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 13th, 2007, 07:57 PM
Canadian Man Canadian Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 Canadian Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 25 sec
Reputation Power: 0
Batch script with SSH

I'm using windows Xp and and I'm trying to create automated scripts to a linux SSH server. My plan is to be able to click a batch file resulting in all files (in the current folder on my xp machine) to be sent via SSH to my Linux server in /home/eric

So, I read that I needed to setup 'Public Key-Authentication', so that I could log into the ssh password less.

Now, that its done.. I'm trying to create a batch file that can upload the file to the server.

What is the next step? Can someone please help me out with creating a batch file to do this?

Reply With Quote
  #2  
Old July 15th, 2007, 01:51 PM
Canadian Man Canadian Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 Canadian Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 25 sec
Reputation Power: 0
maybe a lead in the right direction would be nice if nobody knows what I would have to do?

Reply With Quote
  #3  
Old July 15th, 2007, 01:55 PM
tj_nt tj_nt is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Posts: 1,617 tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 20 h 48 m 21 sec
Reputation Power: 635
why not use Windows scheduler and FTP ?

Reply With Quote
  #4  
Old July 15th, 2007, 05:35 PM
Canadian Man Canadian Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 Canadian Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 25 sec
Reputation Power: 0
It has to be a script.. long story

Reply With Quote
  #5  
Old July 15th, 2007, 05:48 PM
tj_nt tj_nt is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Posts: 1,617 tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 20 h 48 m 21 sec
Reputation Power: 635
Ok, ... a batch file/script is really nothing more than a command string...

Since you have already compiled the command(s) to make the SSH connection...just add the MOVE or COPY string (to a plain text file with each command on a new line) and save it as whatever.bat

Reply With Quote
  #6  
Old July 16th, 2007, 04:42 PM
Canadian Man Canadian Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 Canadian Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 25 sec
Reputation Power: 0
I'm trying to use "SFTP" however, windows doesn't recognize it. What .exe should I put in the win32 folder to get "SFTP" command working?

Reply With Quote
  #7  
Old July 20th, 2007, 06:41 PM
Canadian Man Canadian Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 Canadian Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 25 sec
Reputation Power: 0
Is there another forum that specializes in Scripts?? I really need some help on this and I don't have an entire summer.

Reply With Quote
  #8  
Old July 20th, 2007, 08:12 PM
tj_nt tj_nt is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Posts: 1,617 tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level)tj_nt User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 20 h 48 m 21 sec
Reputation Power: 635
you've changed from connecting via SSH to FTP ?

did I miss something?

Reply With Quote
  #9  
Old July 21st, 2007, 07:54 PM
Canadian Man Canadian Man is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 Canadian Man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 25 sec
Reputation Power: 0
I'm trying to create automated scripts with SSH. I'm confused at what I must do now.

I have public key authentication enabled

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Batch script with SSH


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway