View Full Version : Access the root with ftp?
Devil_Dude_Lod
2003-09-25, 20:14 PM
I have tryed to ftp into my server with
ftp.(addy).com
root
(pass)
am i doing it wrong or is there something else i hafe to do to login to the root with ftp?
knightfoo
2003-09-25, 20:55 PM
Originally posted by Devil_Dude_Lod
I have tryed to ftp into my server with
ftp.(addy).com
root
(pass)
am i doing it wrong or is there something else i hafe to do to login to the root with ftp?
You cannot log into FTP as the root user .. it is a huge security risk. Not only is the root password transmitted over the Internet (and possibly untrusted networks) in plain text, it would allow someone who managed to exploit your FTP server to wreak havoc on your server. If you need to modify a file that is in an area of the system that your normal user cannot access, you should either
1. log in through SSH, switch to root, and modify the file
2. log in through SSH, switch to root, move the file to your home directory, download the file, modify it, reupload it, move it back to where it was
If you absolutely must transfer files as root, you should use SFTP .. this is part of SSH which is encrypted and secure. You would have to enable root logins through SSH (which isn't recommended, but is safer than root logins through FTP) and install an SFTP client on your computer at home.
-knightfoo
Shade
2003-09-26, 08:53 AM
Two questions knightfoo;
- How do you move something as in option two that you provided
- Where can I find a good "quickguide" so I can stop asking such stupid questions
-Shade
(replace whats in the %%'s with the actual data needed ;-))
prompt$> su
%root_password%
prompt$> cp %filename% ./%filename%
prompt$> exit
Or, in one commandline
prompt$> su -c'cp %filename% ./%filename%'
and it will prompt you for the root password.
You can then use scp to copy it down to your local machine. The following command line will grab it. run it from your local machine. Then, just switch the source and destinations to put it back
scp %username%@%servername%:~/%filename% ./%filename%
Depending on what is being edited though, i normally just su to root, fire up emacs, do the edit and exit back to the user. Coping it to the local machine is too many steps.
see man ssh, man scp for information on those commands.
Altp.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.