auto-login script for connecting to remote m/n by using telnet/ftp/ssh
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
auto-login script for connecting to remote m/n by using telnet/ftp/ssh
Hi all,
I need a script for getting connection to remote machine by using ssh/telnet/ftp.
and that script should do
1.copy the files/scripts from my machine to remote machine.
2.execute the script at remote machine and copy the output file from remote m/n to my local machine.
I have done with the connectivity part by using Expect script.
#!/usr/bin/expect -f
spawn telnet <IP address>
expect -re "login"
send "username\n"
expect -re "Password"
send "password of the user\n"
interact
Can you please help me for getting the other 2 requirements.
this is just weird, i've seen like 5 expect questions today, and hardly any ever before...
anywho... firslty don't use telnet. secondsly use ssh, thirdly use preshared keys to mean you don't need to log in at all. you've no need to run expect at all.
I need a script for getting connection to remote machine by using ssh/telnet/ftp.
and that script should do
1.copy the files/scripts from my machine to remote machine.
2.execute the script at remote machine and copy the output file from remote m/n to my local machine.
I have done with the connectivity part by using Expect script.
#!/usr/bin/expect -f
spawn telnet <IP address>
expect -re "login"
send "username\n"
expect -re "Password"
send "password of the user\n"
interact
Can you please help me for getting the other 2 requirements.
Thanks in advance
Hi all
The Auto login part works great
I have been searching for days for a thing like that and this is the first one wich really worked
Good Script
10x
I made a free open source tool named SendCommand that would permit you to automate logins (ssh/telnet) and command execution on your routers. It has been developed in perl and it is highly customizable.
So we create a file, where we can specify an IP address of the remote machine, your password and username.
I am wondering how to make it dynamic for any ip like: autologin 10.10.1.1
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.