Hello,
I need to create a shell script to telnet to a remote server. Perform some action and then exit from that server.
I am trying with a dummy script:
#!/bin/bash
telnet 172.11.11.21 8101<dummy.txt
exit
The dummy.txt contains the password.
The script is not working with the port number. I am getting the following error:
8101: Bad file descriptor
Please advice.
programmer321
0
Light Poster
Recommended Answers
Jump to Postusername="myUser" password=`cat dummy.txt` # alternatively: #password=$1 telnet 172.11.11.21 8101 <<EOF $username $password #insert command here EOF
All 4 Replies
omrsafetyo
3
Junior Poster in Training
eggi
92
Posting Whiz
ranam
-1
Newbie Poster
eggi
92
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.