- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need to check Telnet Login in Hundred Servers ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2003 07:09 PM
тАО08-07-2003 07:09 PM
I need to check if my unix userid is working
in hundreds of Unix server. The userid and password are same, but only host will be different.
Manually doing telnet login to all server is
very time consuming. So I try to hard code a single script to login. Then I try to rcp .profile to the local unix host with name as hostname_profile. Then exit, try to do same
way for next server and so on.
Can you please write a small unix script for this for one server (sample). Similar way I will do for all my servers.
Thanks
R.Ezhil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2003 07:30 PM
тАО08-07-2003 07:30 PM
SolutionYou asked this question yesterday. See link:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x06fc4c65a6733c479b8a69dde43b3aeb,00.html
The simple answer is that you can't do this by passing variables (such as username & password)to telnet. It won't accept them.
If you click on the link Stefan posted, you'll find a very good solution to your problem using expect (see Rainer's post. Ivan provides the solution at the end of the thread using expect).
Hope this helps you.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 05:26 PM
тАО08-08-2003 05:26 PM
Re: Need to check Telnet Login in Hundred Servers !!
They are correct, 'expect' is the one to use. There is a default program that is installed with 'expect' called 'passmass' that is built for what you are trying to do. If it does not exist on your server in /usr/local/bin, I would recommend doing a google search for it.
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 06:30 PM
тАО08-08-2003 06:30 PM
Re: Need to check Telnet Login in Hundred Servers !!
ftp HOST
$HOME/ftpuser/.netrc
(* Example of .netrc file *)
machine SERVER login USER password SECRET
quit
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B9106-90011/B9106-90011_top.html&con=/hpux/onlinedocs/B9106-90011/00/00/74-con.html&toc=/hpux/onlinedocs/B9106-90011/00/00/74-toc.html&searchterms=netrc&queryid=20030808-202449
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2003 10:38 AM
тАО08-11-2003 10:38 AM
Re: Need to check Telnet Login in Hundred Servers !!
u can create a shell script using ftp .
U should get at least all the ip address in one file.If any of ur sever's /etc/hosts file is updated with all hostnames you can extract the ip address from that hosts file to a test file in this case hosts.txt.
A sample script is given below.
#!/bin/sh
ftp_function (){
ftp -nv $a <
get /etc/hosts hosts-${a}
bye
EOF
}
#above creates a function called ftp_function , and the function is executed for every ip address.
cat hosts.txt |while read a;do
ftp_function
done
Try it out.If this script stops when a login failure happens then u have to modify the script , for checking the ftp log in is success or not, this can be achieved by including checking of exit codes.
regds,
baiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-11-2003 10:50 AM
тАО08-11-2003 10:50 AM
Re: Need to check Telnet Login in Hundred Servers !!
http://search.cpan.org/author/JROGERS/Net-Telnet-3.03/lib/Net/Telnet.pm