Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. SSL and certs for SFTP

SSL and certs for SFTP

Scheduled Pinned Locked Moved Solved Support
9 Posts 4 Posters 1.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    roofboard
    wrote on last edited by girish
    #1

    Hi,

    I am setting up some gitlab CI/CD and would like to ftp files onto my wordpress instance. Also I would like to secure with ssl... and certs. Is that possible with cloudron?

    Here is the command I was looking at using, any ideas? What layers of security can and can't i have while performing sftp?

    update_wpressapi:
      stage: update_wpressapi
      rules:
        - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
        # && $CI_MERGE_REQUEST_APPROVALS_REQUIRED && $CI_MERGE_REQUEST_APPROVED'
    
      script:
        - apt-get install -y lftp
        - |
          lftp -e "set ftp:ssl-allow yes; set ftp:ssl-auth TLS; set \
          ftp:ssl-protect-data yes; \
          set ssl:key-file $FTP_SSL_KEY; \
          set ssl:cert-file $FTP_SSL_CERT; \
          cd /path/to/destination; \
          ls -R --max-depth=2; bye" -u \
          $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
    
        - lftp -e "set ftp:ssl-allow yes; \
          set ftp:ssl-auth TLS; \
          set ftp:ssl-protect-data yes; \
          set ssl:key-file $FTP_SSL_KEY; \
          set ssl:cert-file $FTP_SSL_CERT; \
          put base-plugin.zip -o /path/to/destination/base- 
          plugin.zip; bye" -u \
    $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
    
    M nebulonN girishG 4 Replies Last reply
    0
    • R roofboard

      Hi,

      I am setting up some gitlab CI/CD and would like to ftp files onto my wordpress instance. Also I would like to secure with ssl... and certs. Is that possible with cloudron?

      Here is the command I was looking at using, any ideas? What layers of security can and can't i have while performing sftp?

      update_wpressapi:
        stage: update_wpressapi
        rules:
          - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
          # && $CI_MERGE_REQUEST_APPROVALS_REQUIRED && $CI_MERGE_REQUEST_APPROVED'
      
        script:
          - apt-get install -y lftp
          - |
            lftp -e "set ftp:ssl-allow yes; set ftp:ssl-auth TLS; set \
            ftp:ssl-protect-data yes; \
            set ssl:key-file $FTP_SSL_KEY; \
            set ssl:cert-file $FTP_SSL_CERT; \
            cd /path/to/destination; \
            ls -R --max-depth=2; bye" -u \
            $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
      
          - lftp -e "set ftp:ssl-allow yes; \
            set ftp:ssl-auth TLS; \
            set ftp:ssl-protect-data yes; \
            set ssl:key-file $FTP_SSL_KEY; \
            set ssl:cert-file $FTP_SSL_CERT; \
            put base-plugin.zip -o /path/to/destination/base- 
            plugin.zip; bye" -u \
      $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
      
      M Offline
      M Offline
      msbt
      App Dev
      wrote on last edited by msbt
      #2

      @roofboard you can enable SFTP access in the Access Control tab of the app, where you can set operators that can use SFTP. Not sure why you'd need separate certs to do that.

      1 Reply Last reply
      0
      • R roofboard

        Hi,

        I am setting up some gitlab CI/CD and would like to ftp files onto my wordpress instance. Also I would like to secure with ssl... and certs. Is that possible with cloudron?

        Here is the command I was looking at using, any ideas? What layers of security can and can't i have while performing sftp?

        update_wpressapi:
          stage: update_wpressapi
          rules:
            - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
            # && $CI_MERGE_REQUEST_APPROVALS_REQUIRED && $CI_MERGE_REQUEST_APPROVED'
        
          script:
            - apt-get install -y lftp
            - |
              lftp -e "set ftp:ssl-allow yes; set ftp:ssl-auth TLS; set \
              ftp:ssl-protect-data yes; \
              set ssl:key-file $FTP_SSL_KEY; \
              set ssl:cert-file $FTP_SSL_CERT; \
              cd /path/to/destination; \
              ls -R --max-depth=2; bye" -u \
              $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
        
            - lftp -e "set ftp:ssl-allow yes; \
              set ftp:ssl-auth TLS; \
              set ftp:ssl-protect-data yes; \
              set ssl:key-file $FTP_SSL_KEY; \
              set ssl:cert-file $FTP_SSL_CERT; \
              put base-plugin.zip -o /path/to/destination/base- 
              plugin.zip; bye" -u \
        $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
        
        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #3

        @roofboard Cloudron only runs an Sftp serfver, not ftpS

        If the app data is exposed through ftp or not, is dependent on the app, however the wordpress package does support it.

        Further info on the connection can be found at https://docs.cloudron.io/apps/#ftp-access

        1 Reply Last reply
        1
        • nebulonN nebulon marked this topic as a question on
        • R roofboard

          Hi,

          I am setting up some gitlab CI/CD and would like to ftp files onto my wordpress instance. Also I would like to secure with ssl... and certs. Is that possible with cloudron?

          Here is the command I was looking at using, any ideas? What layers of security can and can't i have while performing sftp?

          update_wpressapi:
            stage: update_wpressapi
            rules:
              - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
              # && $CI_MERGE_REQUEST_APPROVALS_REQUIRED && $CI_MERGE_REQUEST_APPROVED'
          
            script:
              - apt-get install -y lftp
              - |
                lftp -e "set ftp:ssl-allow yes; set ftp:ssl-auth TLS; set \
                ftp:ssl-protect-data yes; \
                set ssl:key-file $FTP_SSL_KEY; \
                set ssl:cert-file $FTP_SSL_CERT; \
                cd /path/to/destination; \
                ls -R --max-depth=2; bye" -u \
                $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
          
              - lftp -e "set ftp:ssl-allow yes; \
                set ftp:ssl-auth TLS; \
                set ftp:ssl-protect-data yes; \
                set ssl:key-file $FTP_SSL_KEY; \
                set ssl:cert-file $FTP_SSL_CERT; \
                put base-plugin.zip -o /path/to/destination/base- 
                plugin.zip; bye" -u \
          $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
          
          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          @roofboard I guess your real question is how to automate this. We automate SFTP in testing like this - https://git.cloudron.io/cloudron/lamp-app/-/blob/master/test/test.js#L120

          sshpass -p${process.env.PASSWORD} sftp -P 222 -o StrictHostKeyChecking=no -oHostKeyAlgorithms=+ssh-rsa -oBatchMode=no -b - ${process.env.USERNAME}@${app.fqdn}@${apiEndpoint}
          
          1 Reply Last reply
          0
          • R roofboard

            Hi,

            I am setting up some gitlab CI/CD and would like to ftp files onto my wordpress instance. Also I would like to secure with ssl... and certs. Is that possible with cloudron?

            Here is the command I was looking at using, any ideas? What layers of security can and can't i have while performing sftp?

            update_wpressapi:
              stage: update_wpressapi
              rules:
                - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
                # && $CI_MERGE_REQUEST_APPROVALS_REQUIRED && $CI_MERGE_REQUEST_APPROVED'
            
              script:
                - apt-get install -y lftp
                - |
                  lftp -e "set ftp:ssl-allow yes; set ftp:ssl-auth TLS; set \
                  ftp:ssl-protect-data yes; \
                  set ssl:key-file $FTP_SSL_KEY; \
                  set ssl:cert-file $FTP_SSL_CERT; \
                  cd /path/to/destination; \
                  ls -R --max-depth=2; bye" -u \
                  $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
            
                - lftp -e "set ftp:ssl-allow yes; \
                  set ftp:ssl-auth TLS; \
                  set ftp:ssl-protect-data yes; \
                  set ssl:key-file $FTP_SSL_KEY; \
                  set ssl:cert-file $FTP_SSL_CERT; \
                  put base-plugin.zip -o /path/to/destination/base- 
                  plugin.zip; bye" -u \
            $FTP_USERNAME,$FTP_PASSWORD ftps://my.domain.com
            
            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @roofboard also, if you want to use lftp , I think you have to use sftp://my.domain.com instead of ftps . IIRC, we had some trouble automating with lftp. This is why we use sftp command.

            R 1 Reply Last reply
            0
            • girishG girish

              @roofboard also, if you want to use lftp , I think you have to use sftp://my.domain.com instead of ftps . IIRC, we had some trouble automating with lftp. This is why we use sftp command.

              R Offline
              R Offline
              roofboard
              wrote on last edited by
              #6

              @girish I tried this 7 ways from Sunday, then gave up and tried to just get access from the terminal. Every time I get permission denied.

              Did the above command work for you?

              I am trying to do this with a App Passwords
              and just having no luck even when i hardcode the usernames and passwords.

              girishG 1 Reply Last reply
              0
              • R roofboard

                @girish I tried this 7 ways from Sunday, then gave up and tried to just get access from the terminal. Every time I get permission denied.

                Did the above command work for you?

                I am trying to do this with a App Passwords
                and just having no luck even when i hardcode the usernames and passwords.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                @roofboard You can try this on our demo. Password is cloudron.

                $ sftp -P 222 cloudron@site.demo.cloudron.io@my.demo.cloudron.io 
                cloudron@site.demo.cloudron.io@my.demo.cloudron.io's password: 
                Connected to my.demo.cloudron.io.
                sftp> 
                

                I also tested with app password (ee8431debcc35383) . Same command above works. e80850a8-2ce1-4a1c-9d0d-b973eac75b0c-image.png

                Can you test above? Hopefully, nobody deletes the app before you get to it.

                girishG 1 Reply Last reply
                0
                • girishG girish

                  @roofboard You can try this on our demo. Password is cloudron.

                  $ sftp -P 222 cloudron@site.demo.cloudron.io@my.demo.cloudron.io 
                  cloudron@site.demo.cloudron.io@my.demo.cloudron.io's password: 
                  Connected to my.demo.cloudron.io.
                  sftp> 
                  

                  I also tested with app password (ee8431debcc35383) . Same command above works. e80850a8-2ce1-4a1c-9d0d-b973eac75b0c-image.png

                  Can you test above? Hopefully, nobody deletes the app before you get to it.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @girish said in SSL and certs for SFTP:

                  sftp -P 222 cloudron@site.demo.cloudron.io@my.demo.cloudron.io

                  Please note the double '@' . It's not a typo. The username contains an @ .

                  R 1 Reply Last reply
                  0
                  • girishG girish

                    @girish said in SSL and certs for SFTP:

                    sftp -P 222 cloudron@site.demo.cloudron.io@my.demo.cloudron.io

                    Please note the double '@' . It's not a typo. The username contains an @ .

                    R Offline
                    R Offline
                    roofboard
                    wrote on last edited by
                    #9

                    @girish !!!! I would never have guessed that - I missed the fine print. "log in with your username" that changes everything thanks for clarifying.

                    1 Reply Last reply
                    0
                    • girishG girish has marked this topic as solved on
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search