Recognition

Posts

8 Posts
  • Published Answer

    Unable to Connect after adding second authorization Key

    I do not have any /var/log/messages or /var/log/secure on either server. The error I get is (info redacted): user@XXX.XX.XX.XXX…
    By aaronmweiss
  • Published Question

    Unable to Connect after adding second authorization Key

    I have a VM running Ubuntu Server 18.04 on my local network. This local VM is not accessible outside my network. I want to connect this VM to my Droplet. I already have an ssh key for this droplet, and I am able to c...
    2 By aaronmweiss Security Ubuntu 18.04
  • Published Answer

    DOCTL "Access Token is Required" even after initializing

    Adding doctl auth init to the script the first go around worked perfectly.
    By aaronmweiss
  • Published Question

    DOCTL "Access Token is Required" even after initializing

    Just installed DOCTL on my Raspberry Pi. I have performed doctl auth ini and verified my API Token. Yet, when I run my script, I get the following: Error: unable to initialize DigitalOcean api client: access token is...
    Accepted Answer: Hi there @aaronmweiss, It sounds like that your script might be running as a different user, for example you've authenticated as your default pi user but the script is executed as the root user. I would recommend addi...
    2 By aaronmweiss API
  • Published Question

    Snapshot List outputs in file and email as single line

    I'm looking to develop a script where the Snapshot list is emailed to someone. When I run doctl compute droplet snapshots $dropletid, I get the following: ID Name Type ...
    1 By aaronmweiss DigitalOcean API and CLI (doctl)
  • Published Question

    DOCTL While Loop Not Working in CRON

    When I run the following manually via the command line, it work beautifully. However, when I run this same script via sudo crontab, it just deletes everything. What could I be doing wrong: Assumption: There are 10 sn...
    Accepted Answer: Hello, Have you allowed the sudo /snap/bin/doctl command to be executed without a password? You could do that by editing your sudoers file with the visudo command and adding something like: <^>your_user<^> host = (ro...
    1 By aaronmweiss API
  • Published Answer

    Paid Snapshots & Batch removing snapshots

    The for loop asb was helpful for my needs.
    By aaronmweiss
  • Published Question

    Progress Indicator for DOCTL Commands

    I'm building a script that automatically will shutdown a droplet before it creates a snapshot, and then powers it back on. The snapshot takes time to complete, but I think it would be great to see progress indicator. ...
    Accepted Answer: When scripting with doctl you can pass the --wait flag to Droplet "action" commands in order to block until the action has completed. For example: doctl compute droplet-action power-off --wait <^><droplet-id><^> Unf...
    1 By aaronmweiss DigitalOcean Linux Basics DigitalOcean API and CLI (doctl)