Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Shell Script Wait For Password Prompt


  • Please log in to reply
2 replies to this topic

#1 dregern

dregern

  • Members
  • 19 posts
  • OFFLINE
  •  
  • Local time:09:27 AM

Posted 21 February 2007 - 04:52 AM

HI, i just wanted to ask, i actually wanna develop a shell script which is to able it to connect remote pc via
ssh, the problem is, i cant figured out, how shell script can wait password prompt, and send password to the request..i've tried : :flowers:

#!/bin/sh

password="root"

exec ssh root@192.168.1.4

echo "$password"


but it still wont works, is there any solution? Please helpp.. TQ :thumbsup:

BC AdBot (Login to Remove)

 


m

#2 raw

raw

    Bleeping Hacker


  • Members
  • 2,577 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Texas
  • Local time:09:27 AM

Posted 21 February 2007 - 12:38 PM

You need to use ssh-keygen as described here:
http://www.issociate.de/board/post/22774/s...gin-script.html
Third post down should get you what you want.

rawsig.png

 rawcreations.net          @raw_creations


Current systems: WHAT OS, BackTrack-raw, PCLinuxOS, Peppermint OS 6, Kali Linux

and a custom Linux From Scratch server hosting a bunch of top secret stuff.


#3 dregern

dregern
  • Topic Starter

  • Members
  • 19 posts
  • OFFLINE
  •  
  • Local time:09:27 AM

Posted 23 February 2007 - 12:14 AM

ouhcay, ill try...thanks a lot




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users