HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- autamatic telnet
Operating System - HP-UX
1826332
Members
3498
Online
109692
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
02-10-2002 08:28 PM
02-10-2002 08:28 PM
autamatic telnet
can any one tell me the code for the following task..
script has to automatically telnet/or ftp to one location and should store the out put of the df -k .. in a variable and i hav to use this variable after comming out from the script
Thanks in advance
chakri
script has to automatically telnet/or ftp to one location and should store the out put of the df -k .. in a variable and i hav to use this variable after comming out from the script
Thanks in advance
chakri
coolchecks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2002 08:57 PM
02-10-2002 08:57 PM
Re: autamatic telnet
Can you use something like remsh instead of telnet?
Your variable could be something like:
dfvar=`remsh remotehost df -k /filesystem`
If not remsh, what about ssh?
Your variable could be something like:
dfvar=`remsh remotehost df -k /filesystem`
If not remsh, what about ssh?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2002 09:03 PM
02-10-2002 09:03 PM
Re: autamatic telnet
Hi,
If you want to automate this task there are
two ways to go about it.
First you could use a remote shell (remsh)
from server A to server B or you could use
a script to pick up the files. I've attached
a sample script to help, or you could have
a look in the below link which has some good
information.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x83e45f260cafd4118fef0090279cd0f9,00.html
HTH
-Michael
If you want to automate this task there are
two ways to go about it.
First you could use a remote shell (remsh)
from server A to server B or you could use
a script to pick up the files. I've attached
a sample script to help, or you could have
a look in the below link which has some good
information.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x83e45f260cafd4118fef0090279cd0f9,00.html
HTH
-Michael
Anyone for a Mutiny ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 03:57 AM
02-11-2002 03:57 AM
Re: autamatic telnet
I stole this fragment of code from a forum post by Kenny C. This shows you how to get a telnet seesion to start automatically and run a command. If you redirect the last line to a file then you have the info you need on your own machine and then it's just a matter of grepping it out.
Ron
# hostname is the name of the remote machine
# username is the name of the user
# password is the password of the user username
REMOTE=hostname #or IP address
(sleep 5
echo username
sleep 5
echo password
sleep 15
echo "ls -ald /tmp" #Your command
sleep 5
echo exit) |telnet $REMOTE
Ron
# hostname is the name of the remote machine
# username is the name of the user
# password is the password of the user username
REMOTE=hostname #or IP address
(sleep 5
echo username
sleep 5
echo password
sleep 15
echo "ls -ald /tmp" #Your command
sleep 5
echo exit) |telnet $REMOTE
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP