- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to use host commands in an ftp session
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
тАО04-15-2004 07:28 AM
тАО04-15-2004 07:28 AM
like ...
$ftp> grep *.*
2. what is the command to connect from one UNIX host to another UNIX box ..
like telnet
I tried the same its not working. Please advice.
Thanks
Suman
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 07:34 AM
тАО04-15-2004 07:34 AM
Re: How to use host commands in an ftp session
In answer to question 2 the answer
is telnet
wait for user name: type
wait for password and type
if you want to log in automatically, you have to look at rlogin, or some variation of that.
I am also not completely clear, what your first question is, so if you can elaborate, i may be able to answer
Regards,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 07:36 AM
тАО04-15-2004 07:36 AM
Re: How to use host commands in an ftp session
for example telnet 127.0.0.1 5555 would telnet to port 5555 on your local machine (HP Data Protector daemon port).
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 07:37 AM
тАО04-15-2004 07:37 AM
Re: How to use host commands in an ftp session
Here is a script that can do this:
########################
#Start Ftp and get file#
########################
ftp -nv ${SERVER} << FTPEOF > /tmp/temp_log.$$
user ${USERNAME} ${PASSWORD}
#Get file
get $1
bye
FTPEOF
You can insert commands before the ftp line or avter the FTPEOF statement, but not in the middle.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 07:56 AM
тАО04-15-2004 07:56 AM
Re: How to use host commands in an ftp session
How do I use rlogin
I am trying
$rlogin < remote hostname> <-l username>
but it comes back asking for password. I need to write a script to connect to remote box without being prompted for username or password.
I have to do a complex logic to check the availability of specific file name pattern on the remote box. If the file is not available then my script has to come back again to this box after 30 minutes and check again.
Please advice.
Thanks
Suman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 08:53 AM
тАО04-15-2004 08:53 AM
Re: How to use host commands in an ftp session
So my .rhosts would look be something like this.
/home/mstrong/.rhosts
permissions 644
The contents of the file look as follows:
athena mstrong
where athena would be the remote host, and mstrong would be the username on that host.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 09:10 AM
тАО04-15-2004 09:10 AM
Re: How to use host commands in an ftp session
thanks for your reply. But my question is about the password. How can I avoid being prompted for password. Can i save this password somewhere? Please advice?
I tried using
$rlogin
Ss there any way I can specify the password in the same command line?
I have to write a script that will connect to the remote box without being prompted for username and password.
Thank You,
Suman
Thank You,
Suman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 09:12 AM
тАО04-15-2004 09:12 AM
SolutionCreate a .netrc file on the host containing an entry like this in the FTP clients home directory, it should have mode 600 and be owned by the user (dumbo, in this case):
machine bozo login dumbo passwd elephant
No password will then be need by rhe "r" commands, FTP, or Perl using these commands. Now use the attached script to attempt to get the file "ears" from directory "/trunk" on host "bozo".
ftpget.pl -h bozo -l dumbo -d /trunk ears
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "All ok"
else
echo "Failed; status = ${STAT}; try again later"
fi
That's all you have to do; if "ears" isn't found, the result is 5.
Because Net::FTP also has the ls and dir FTP commands, you can make this script as powerful as you like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 09:19 AM
тАО04-15-2004 09:19 AM
Re: How to use host commands in an ftp session
Put the remote host first, then the username.
# cat >.rhosts
localhost bob
^D
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2004 09:43 AM
тАО04-15-2004 09:43 AM
Re: How to use host commands in an ftp session
A. Clay Stephenson Thanks for your reply. I am trying to log from machine A to machine B. I using the user "ftp_user" to login to the remomte machine "B" . ftp_user has an account on B but he doesn't have an account on A. Since "ftp_user" doesn't have an account on A I can't make it the owner of .netrc file. I hope I understand what you are tyring to say..
regards
Suman