lotus



previous page: 014.  I have access to a remote Unix machine that has some commercial software that uses X which I would like to run remotely on my display. How do I do it?
  
page up: Brief Linux FAQ
  
next page: 016.  Is it possible to make recursive downloads to mirror ftp or web sites or just download a file, perhaps while not even logged in?

015. I am sick of having to type in my password interactively each time I want to start a shell on a remote server. Is there a way to avoid this.




Description

This article is from the the Brief Linux FAQ (BLFAQ) Maintained by Neil Zanella nzanella@ganymede.cs.mun.ca

015. I am sick of having to type in my password interactively each time I want to start a shell on a remote server. Is there a way to avoid this.

Surprisingly yes. Simply replace the words "remote-host", "username", and "password" in the following expect script and do a "chmod +x name-of-script". You can then simply invoke the script to log into the remote host.

#!/usr/bin/expect
eval spawn telnet remote-host
set timeout 20
expect ogin:
send "username\r"
expect assword:
send "password\r"
sleep 2
interact

Alternatively you can try out the ktelnet program.

 

Continue to:















TOP
previous page: 014.  I have access to a remote Unix machine that has some commercial software that uses X which I would like to run remotely on my display. How do I do it?
  
page up: Brief Linux FAQ
  
next page: 016.  Is it possible to make recursive downloads to mirror ftp or web sites or just download a file, perhaps while not even logged in?