- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: telnet scripts ??
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
Forums
Discussions
Discussions
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
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
11-06-2000 11:58 AM
11-06-2000 11:58 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 12:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 12:02 PM
11-06-2000 12:02 PM
Re: telnet scripts ??
I think what you are looking for is the "remote shell" (remsh) command. Look at the man pages for 'remsh'.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 12:04 PM
11-06-2000 12:04 PM
Re: telnet scripts ??
Just a thought
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 12:10 PM
11-06-2000 12:10 PM
Re: telnet scripts ??
That functionality is only available in either remsh or ssh. You cannot use telnet non-interactively. I would suggest you go with the ssh setup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 02:33 PM
11-06-2000 02:33 PM
Re: telnet scripts ??
eg remsh HOST "ls -l /etc"
Regards John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 02:33 PM
11-06-2000 02:33 PM
Re: telnet scripts ??
eg remsh HOST "ls -l /etc"
Regards John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 02:34 PM
11-06-2000 02:34 PM
Re: telnet scripts ??
eg remsh HOST "ls -l /etc"
Regards John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2000 11:55 PM
11-06-2000 11:55 PM
Re: telnet scripts ??
remsh is the program you need, providing the
.rhosts file is set properly on the remote
host.
If you want to start an X11 executable
on the remote host, you can use xon as in
xon HOST /usr/bin/X11/xclock
xon will take care of your $DISPLAY
environment variable.
I'm using xon as an easy way to open
a new dtterm window on a remote host by
setting a few aliases in my .profile
for example:
alias sys01='/usr/contrib/bin/X11/xon
sys01 /usr/bin/X11/dtterm -name sys01 -ls'
Typing "sys01" will then open a new dtterm
window, named sys01 with a login shell on the
remote host (that's what the -ls is for)
My $DISPLAY environment variable will
be automatically set in this new window.
Don't forget the .rhosts file, it's needed
Dan
PS: xon is unsupported by HP but I've been
using it for years without any problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 12:22 AM
11-07-2000 12:22 AM
Re: telnet scripts ??
As others have indicated 'remsh' may be the program for you. You do not say what 'box' is so it might not have 'rsh' at all.
We use telnet scripts to login to e.g. routers and retrieve statistics etc.
You might want to look at a program called 'expect' (FreeWare) where you do differently depending on feedback.
A simple telnet script can be constucted doing something like this:
( sleep 2
echo guest
sleep 2
echo guestw
sleep 5
echo ls
sleep 5
echo exit ) | telnet host
The script logs into a host and executes 'ls'.
You need the sleep commands in order to be sure that the previous command has finished. ('expect' is a lot better on this point)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 12:42 AM
11-07-2000 12:42 AM
Re: telnet scripts ??
just to strengthen Perl's bashfully neglected position in this forum,
there is a splendid Module in CPAN for scripting automated telnet sessions.
Please, have a look at
http://www.cpan.org/modules/by-module/Net/Net-Telnet-3.02.readme
However, if not using Perl I'd go for ssh which is a much better replacement for rsh (which HP unconventionally called remsh, the other is restricted shell in HP lingo).