Sponsored Content
Top Forums Shell Programming and Scripting Not able to pass Username and Password in telnet session Post 302366500 by giannicello on Thursday 29th of October 2009 05:20:03 PM
Old 10-29-2009
How about:

Code:
username="root"
password="password"
telnet 102.240.101.223
spawn
expect "login:"
send "$username\r"
expect "password:"
send "$password\r"
send "exit\r"
expect eof

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

telnet session timeout

hi, we can set something such that if the user has been idle for a while, it will auto disconnect. where to do so? thanks (6 Replies)
Discussion started by: yls177
6 Replies

2. Shell Programming and Scripting

Telnet session does not expire

Dear friends.. Our project has a module that runs on handheld devices. Through the handheld we telnet to solaris where the application actually runs. I noticed that after starting a session through the handheld, if i go out of range or if i remove and replace the battery in the handheld, the... (1 Reply)
Discussion started by: deepsteptom
1 Replies

3. Shell Programming and Scripting

Telnet Session

{ sleep 2 echo "$user" sleep 2 echo "$password" sleep 2 echo " ls" sleep 10 echo "exit" }| telnet $server I have a machine x and i have executed the above script on machine 'x'. i entered the... (6 Replies)
Discussion started by: pathanjalireddy
6 Replies

4. UNIX for Dummies Questions & Answers

Unix Telnet session

Hi Is there any way whilst in a telnet session you can view your client machine name that you are using to connect to the Unix box ? :eek: (2 Replies)
Discussion started by: mlucas
2 Replies

5. UNIX for Dummies Questions & Answers

Telnet Session to AIX

Hello, I have AIX 5.3 at home connected to netgear router. Port Forwarding has been enabled on the router. Problem is that if I want to telnet, I have to try 2 or 3 times before I can get a logon prompt. It times out for first or second time (Connection to session <IP_Address> failed: Connection... (1 Reply)
Discussion started by: bluebee
1 Replies

6. UNIX for Dummies Questions & Answers

Disconnecting a telnet session

How can I disconnect an existing telnet session? The host is a serial port server with multiple ports. The users login using the host's name and a port, i.e. telnet host01 1235. Thanks. (14 Replies)
Discussion started by: cooldude
14 Replies

7. Shell Programming and Scripting

Read Oracle Username password SID from single file and pass it to shell

Dear All I am trying to write one shell which will be running through Cron which contain one SQL query. But I want to draw/fetch the Username password and Instance name (required to loging to the database) from one single file to run that SQL query . Also this file contain details of multiple... (2 Replies)
Discussion started by: jhon
2 Replies

8. HP-UX

ssh session getting hung (smilar to hpux telnet session is getting hung after about 15 minutes)

Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
Discussion started by: yoda9691
1 Replies

9. Shell Programming and Scripting

Expect scripting telnet stop on bad username or password

I am trying to build and expect script to log into multiple aix boxes and change password. I need for the script to terminate if it cannot log into a server because the username or password is wrong. #!/usr/bin/expect set timeout 1 set host set user set password set uh "Unknown host" set... (3 Replies)
Discussion started by: leemalloy
3 Replies
fence_rsb(8)						      System Manager's Manual						      fence_rsb(8)

NAME
fence_rsb - I/O Fencing agent for Fujitsu-Siemens RSB SYNOPSIS
fence_rsb [OPTION]... DESCRIPTION
fence_rsb is an I/O Fencing agent which can be used with the Fujitsu-Siemens RSB management interface. It logs into an RSB device via tel- net and reboots the associated machine. Lengthy telnet connections to the RSB device should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. fence_rsb accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent. fence_rsb can be run by itself with command line options. This is useful for testing. Vendor URL: http://www.fujitsu.com OPTIONS
-a IPaddress IP address or hostname of the RSB device. -h Print out a help message describing available options, then exit. -l login Login name. -n telnet_port The port number on which the telnet service listens. -o action The action required. This can be reboot (default), off, on, or status. -p password Password for login. -S path Full path to an executable to generate the password for login. -v Verbose. Print informational messages to standard out. -V Print out a version message, then exit. STDIN PARAMETERS
agent = < param > This option is used by fence_node(8) and is ignored by fence_rsb. ipaddr = < hostname | ip > IP address or hostname of the device. telnet_port = < port number > The port number on which the telnet service listens. login = < param > Login name. option = < param > The action required. This can be reboot (default), off, on, or status. passwd = < param > Password for login. passwd_script = < param > Full path to an executable to generate the password for login. SEE ALSO
fence(8), fence_node(8) fence_rsb(8)
All times are GMT -4. The time now is 05:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy