![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to use telnet in script | sibghat | Shell Programming and Scripting | 9 | 1 Week Ago 08:35 AM |
| telnet through script | arun.viswanath | UNIX for Dummies Questions & Answers | 1 | 03-26-2006 09:33 AM |
| ksh telnet script | rwunwla | Shell Programming and Scripting | 5 | 12-16-2005 06:22 AM |
| telnet in a script | vaccari | UNIX for Dummies Questions & Answers | 10 | 10-10-2001 08:37 AM |
| telnet in a script | vaccari | IP Networking | 4 | 12-15-2000 12:42 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Telnet and ssh in a script
dear all,
I know that this question has been asked before frequently, but I really don't get it. My question is composed of several ones. First:To telnet through a script, I was told to use the way described below, and it works for me, but i don't understand the syntax here. according to the piping, echoing the username, the password and the commands are done first, then the telnetting.. How is that?! ( echo open hostname sleep 5 echo username sleep 1 echo password sleep 1 echo some more output, etc. ) | telnet Second: Is that the only way that I can do telnet through a script in UNIX? Third: What about SSH, I know that I can't do the samething with ssh, Is there another way?? Thanks for your concern... Marawan |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
Quote:
|
|
#3
|
|||
|
|||
|
Quote:
If you have your public key installed in your $HOME/.ssh/authorized_keys on the remote machine then all you need to do is things like to get a remote directory listing... Code:
ssh remote-host-name ls -l Code:
ssh fred@foobar ls -l Code:
cat some.tar | ssh remote-host tar xvf - |
|
#4
|
||||
|
||||
|
Take a look at this thread also, hope it helps a bit.
|
||||
| Google The UNIX and Linux Forums |