Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

OT/BM Configure linux server connection with implicit sudo



  • Heĺlo Inedo team
    Is there any way to add a server with ssh connection with implicit sudo ?
    I have this case as ssh root login is not allowed on some of our servers.
    Best regards
    PhilippeC.


  • inedo-engineer

    Hi @philippe-camelio_3885 ,

    I don't believe that root is required to SSH into a Linux server.

    What did you mean by implicit sudo? I guess you could run sudo from your shell scripts, but I wasn't sure if that's what you meant.

    Cheers,
    Alana



  • Hi @atripp
    it is not for bash script, but when using otter functions:
    Example:
    This will not work a "normal" user.

    Ensure-File /etc/netplan/50-cloud-init.yaml
    (
        Exists: false
    );
    

    I know this can be overcome with bash script, but it would nice to have checkbox "sudo" in otter function.

    I might be the only person who wants this 😕

    Best regards
    Philippe


  • inedo-engineer

    Hi @philippe-camelio_3885 ,

    Thanks for clarifying!

    I'm not sure why that won't work as a "normal" user, but I'm guessing it has to do with the /etc path or something.

    But in any case... I don't think it's possible, at least with our knowledge of the underlying technologies. We rely on the "subprotocol" of SFTP for most file-based operations, and we rely on libssh2 to handle SFTP communication. How those protocols/libraries work is kind of a black box at that level.

    On the plus side, you should be able to write "ensure" scripts using Bash :)

    Cheers,
    Alana



  • Thanks 😊



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation