1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SFTP to root files with root login disabled; is su or sudo possible?

Discussion in 'General Discussion' started by srjonah, Jun 12, 2004.

  1. srjonah

    srjonah New Member

    Joined:
    Jun 12, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    MA, US
    To improve security on a RHE server of mine, I disabled root login using my sshd_config. Of course, I can no longer login as root via SSH/SFTP on this machine. I'd like to keep root locked off indefinitely, but I can't figure out another way to edit system files (owned by root) via SFTP.

    I have been su'ing over to root from an admin account while connecting via SSH, but I'm used to using a graphical client for SFTP-based edits. In the past, if I wanted to change httpd.conf I would have opened up BBEdit and used its FTP/SFTP tool. If I wanted to send up a file to /root I would've used Interarchy or another tool like it.

    I don't know of a way to tell an SFTP program to su or sudo, or if there's even a way? I realize I could be using vi or emacs or another command line editor, but my systems are somewhat complicated and it will be hard to do things that way. Thanks for the help :)
     
    #1 srjonah, Jun 12, 2004
    Last edited: Jun 12, 2004
  2. sawbuck

    sawbuck Active Member

    Joined:
    Jan 18, 2004
    Messages:
    1,356
    Likes Received:
    3
    Trophy Points:
    38
  3. srjonah

    srjonah New Member

    Joined:
    Jun 12, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    MA, US
    Oh, unfortunately I can't run WinSCP, since I'm using Mac OSX 10.3 with Darwin. I did look to see that there's a Unix version of putty, v0.54. Do you think I could use that in conjunction with an SFTP alternative, like Interarchy or BBEdit (Mac programs, I realize they're not as well known,) to solve my problem? Thanks
     
  4. sawbuck

    sawbuck Active Member

    Joined:
    Jan 18, 2004
    Messages:
    1,356
    Likes Received:
    3
    Trophy Points:
    38
    Putty will give you access to root by using su-. I edit the system files online using pico making backups first of course. Will that work for you?
     

Share This Page