The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How we can use plink? shekhar_ssm Shell Programming and Scripting 0 03-16-2008 12:35 PM
Script works on Solaris, not on Linux Silverhood Shell Programming and Scripting 1 10-05-2007 09:52 AM
perl - how come this script works? mjays Shell Programming and Scripting 3 09-17-2007 10:50 AM
works from cmd-line but not in script OFFSIHR Shell Programming and Scripting 4 10-18-2006 08:41 AM
Script works fine until I | more Skovian Shell Programming and Scripting 2 01-11-2006 11:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-29-2006
Yinzer955i Yinzer955i is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 15
Exclamation Plink problem....only works if passwd is in the script

I have a one line bat script run off a XP machine that tar's and compresses some files from a Sol 8 box. It goes something like this (a bit simplified)....

plink -pw <passwd> user@host "tar -cvf - -C / tmp/a_file | compress " > a_file.tar.Z

So this works....and it's worked many times. But now I can't have the password in the script. So I've tried many variations of the command. But once I have the tar.Z on the XP machine, WinRAR complains about the archieve (corrupt or can't read it).

So far I've tried:

plink user@host .....
plink host.....
plink -l user host.......
plink host -l user.....

Any advice or tips would be appreciated

-Yinzer
  #2 (permalink)  
Old 08-29-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
Can you run the bat file interactively and enter the password as a parameter, substitute the parameter in the script.?

You can also set up authentication keys on the remote unix host, if it is allowed. That suppotts the plink host -l username format without having to enter a password.

Last edited by jim mcnamara; 08-29-2006 at 01:10 PM..
  #3 (permalink)  
Old 08-29-2006
Yinzer955i Yinzer955i is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 15
Quote:
Originally Posted by jim mcnamara
Can you run the bat file interactively and enter the password as a parameter, substitute the parameter in the script.?
I guess I should try huh I had to do that for some Unix scripts the other day. This may be a long and painful experiment hehe.....
  #4 (permalink)  
Old 08-29-2006
Yinzer955i Yinzer955i is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 15
Question....

How do you read user input in Windows?


edit: Got it......used SET /p var=some text

Last edited by Yinzer955i; 08-29-2006 at 03:18 PM..
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0