- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: FTP remote exec.
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
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
06-27-2001 08:56 AM
06-27-2001 08:56 AM
FTP remote exec.
Thanks again in advance,
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 10:02 AM
06-27-2001 10:02 AM
Re: FTP remote exec.
As the meaning of ftp is.., what have you in mind?
if you were looking for a script to put/get etc.. the answer is you can write a script that uses .netrc to bypass ftp asking you your name and passwd, and - or in a script you can write: (example of logged seesion with get...)
# ftp_fda : test new ftp...
rm ftp.log
ftp -n > ftp.log << end
open hostsname
user scsf "passwd"
get scsf/fda/fda /export/f/fda
quit
end
if [ `wc -l ftp.log|cut -c 1` -gt 0 ]
then
# Output transfer error
echo " Transfer ERROR : FDA"
sleep 5
else
echo " FTP Transfer OK for FDA"
fi
Best regards
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 10:05 AM
06-27-2001 10:05 AM
Re: FTP remote exec.
The to do it is with the ! in ftp. The ! (exclmation point, bang) lets you execute a shell command.
# ftp localhost
Connected to localhost.
220 cruella FTP server (Version 1.7.212.4 Tue Sep 12 04:33:08 GMT 2000) ready.
Name (localhost:z93573):
331 Password required for z93573.
Password:
230 User z93573 logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> !/tmp/pww/test2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 10:30 AM
06-27-2001 10:30 AM
Re: FTP remote exec.
For example, this would be ran from the nt server:
C:\>ftp unixbox
Connected to unixbox.com.
220 unixbox FTP server (Version 4.1 Sun Nov 19 22:15:05 CST 2000) ready.
User (unxibox.com:(none)): gstark
331 Password required for gstark.
Password:
230 User gstark logged in.
ftp> !/tmp/test.sh
The system cannot find the path specified.
ftp> done
?Invalid command
ftp> bye
221 Goodbye.
As you can see, it cannont find/execute the file remotely.
Thanks
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2001 02:24 PM
06-27-2001 02:24 PM
Re: FTP remote exec.
There is no possibility to run via ftp a script on the ftp server. See man page on ftpd to check all implemented ftp commands.
When during ftp session you use !command, this command is run locally on the ftp client.
If you ftp to the localhost, the same machine is the ftp client and the ftp server, and this explains your observation relating to the running script when being ftped to the localhost.
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2001 12:50 AM
06-28-2001 12:50 AM
Re: FTP remote exec.
In the standard it's file transfet only so you
can't. But a command can be accepted :
SITE. So you connect with your ftp client and
you can use SITE EXEC prg. It's seems to work
with HPUX11 box, but it's HPUX or non standard
commands !!!
For more information see man page of ftpd (it's
depend of your ftp server only).
HTH
Herv?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2001 02:22 AM
06-28-2001 02:22 AM
Re: FTP remote exec.
this depends on the deamon in charge.
ftp> remote help
should give you a list, which commands the remote site accepts. Some provide EXEC just for compatibility reasons, but when you execute it like Herv? pointed out, it says "not implemented". So it depends on the server. Since this is a big security risk, some daemons require special config to activate this feature.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2001 04:00 AM
06-28-2001 04:00 AM
Re: FTP remote exec.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xa2b3d06ed8c8d4118fef0090279cd0f9,00.html
Be carefull, the directories should not be writable by anyone, because then sombody might upload something not so good for you !
This will do it
Volker