Computing.Net > Forums > Linux > Automatic login into remote linux system

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automatic login into remote linux system

Reply to Message Icon

Name: sagayamjoseph
Date: June 10, 2009 at 02:37:29 Pacific
OS: Linux
CPU/Ram: Linux
Subcategory: Software Problems
Comment:

Hi All,
I am new to linux. I am trying to write a script to automate ssh login using expect utility. After I login to the remote host, I should be able to execute a set of commands.

Here's my script;

#!/usr/bin/expect
spawn username@hostname
expect "username@hostname's password:"
send "passwd"
interact
cd ~/customdir

while executing script i have error as spawn, send command not found

What is it that i am doing wrong?
or is there any other way to automate remote login

Any help is highly appreciated

Regards,
Joseph



Sponsored Link
Ads by Google

Response Number 1
Name: jefro
Date: June 11, 2009 at 13:00:12 Pacific
Reply:

Do one command at a time to find problem.

"Best Practices", Event viewer, host file, perfmon, antivirus, anti-spyware, Live CD's, backups, are in my top 10


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Automatic login into remote linux system

Remote Login into KDE, is it Possible? www.computing.net/answers/linux/remote-login-into-kde-is-it-possible/11004.html

Automatic login www.computing.net/answers/linux/automatic-login/2741.html

Linux Mint automatic login. www.computing.net/answers/linux/linux-mint-automatic-login/30043.html