# execute some commands on the local system # access a remote system with an IP address: 10.1.1.1 (for example) telnet 10.1.1.1 # execute some commands on the remote system # log all the activity (in a file) on the Local system # exit telnet # continue on with executing the rest of the script.

Mar 07, 2018 · How to Write a Bash Script on Windows 10. RELATED: How to Install and Use the Linux Bash Shell on Windows 10 When writing shell scripts on Windows, bear in mind that Windows and UNIX-like systems like Linux use different “end of line” characters in text files in shell scripts. Aug 02, 2007 · How to program shell script to automate mass user account creation? EsAsher: Linux - General: 2: 06-30-2007 08:41 AM: Automate FTP session using Shell Script: kalyanofb: Programming: 2: 04-07-2007 08:44 AM: how to automate telnet login, script or something: kiwibird: Linux - Networking: 2: 11-09-2005 02:02 PM: telnet login via shell script Simple Bash Script to execute a command on the router through telnet command - execute_on_router.sh rbash script_name.sh. sh script_name.sh. bash -x script_name.sh. The specified shell will start as a subshell of your current shell and execute the script. This is done when you want the script to start up with specific options or under specific conditions which are not specified in the script.

Sep 07, 2019 · To source a Bash script, we use source (shell built-in) command, which you might have used like source ~/.bash_profile to load the changes made to .bash_profile file. This particular statement executes the content of .bash_profile in the current terminal session hence we are able to see the changes ( since .bash_profile is re-executed ).

File1- IP-list -- contains a list of IPs that you want to execute the script. File2- ssh.sh -- reads the IP-list and execute File3 which is enableint script. File3 - enableint.sh --- script to shuts down an interface. Make ssh.sh and enableint.sh files as executable with chmod +x and you just need to run ./ssh.sh. File1-IP-list. 10.10.1.1. 10.2.3.2

Telnet is both a protocol allowing us to access a remote device to control it and the program used to connect through this protocol. The Telnet protocol is the “cheap” version of ssh, unencrypted, vulnerable to sniffing and Man In the Middle attacks, by default the Telnet port must be closed.

Sep 21, 2016 · BASH script to automate Telnet login not sending returns. If I run the BASH script below it connects OK and then at the 'User:' prompt it enters 'admin', then a few seconds later it adds the password to the username. ie it's not sending a return after entering the username.