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 > Special Forums > UNIX and Linux Applications
.
google unix.com



UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help in writing the shell script ggayathri Shell Programming and Scripting 12 10-02-2008 01:56 PM
Writing shell script bmkreddy Shell Programming and Scripting 2 04-15-2007 03:04 PM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 02:27 AM
Need help for writing shell script deepa20 Shell Programming and Scripting 3 02-01-2006 01:23 PM
Writing a shell Script Chin UNIX for Dummies Questions & Answers 1 06-03-2005 04:32 PM

Reply
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 07-22-2009
lkeswar lkeswar is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 4
Need help in writing shell script

I have written a shell script and when i ran the script,for some point of time it is asking to press enter key manually using keyboard.So i need it the enter key in shell itself.
ex : in my shell script,i used the command ssh-keygen -t rsa so it asks the enter 3 times. can you please let me know to automate this.

Thx,
  #2 (permalink)  
Old 07-22-2009
scottn scottn is offline Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,042
Hi

You could try

Code:
echo "\n\n\n" | ssh-keygen...
  #3 (permalink)  
Old 07-22-2009
lkeswar lkeswar is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 4
Hi,

I tried but helpless.am getting the error Your identification has been saved in \n\n\n.
Your public key has been saved in \n\n\n.pub

Thx,
  #4 (permalink)  
Old 07-22-2009
scottn scottn is offline Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,042
Hi.

I just ran ssh-keygen (sorry I didn't have my Linux running when I answered you originally).

It needs three fields: filename, passkey and verified passkey.

You can pass these in on the command line:

Code:
echo y | ssh-keygen -N new_key -f outfile
The echo y is incase the key already exists and answers the question "overwrite?"
Reply

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 10:41 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