| #!/bin/bash |
| # Acquia |
| CLOUDAPI_ID='id' |
| CLOUDAPI_KEY='key' |
| DOCROOT='docroot' |
| CREDS='${CLOUDAPI_ID}:${CLOUDAPI_KEY}' |
| ssh-keygen -q -b 4096 -t rsa -N '' -f ./script.key |
| PUBKEY=`cat ./script.key.pub` |
| RESPONSE=`curl -s -u $CREDS |
| -X POST --data-binary '{'ssh_pub_key':'${PUBKEY}'}' |
| https://cloudapi.acquia.com/v1/sites/'${DOCROOT}'/sshkeys.json?nickname=script` |
| TASKID=`echo $RESPONSE |
| grep -o ''id.*' |
| grep -o '[0-9]*' |
| grep -m 1 '[0-9]*'` |
| STATUS='null' |
| until [[ $STATUS=~ ^errordone$ ]];do |
| STATUS=`curl -s -u $CREDS |
| https://cloudapi.acquia.com/v1/sites/'${DOCROOT}'/tasks/'${TASKID}'.json |
| grep -o 'state.*' |
| grep -o '[a-z]*' |
| sed -n 2p` |
| echo'ADDING SSH KEY: ${STATUS}' |
| sleep 5 |
| done |
| SSHID=`echo $RESPONSE |
| grep -o 'sshkeyid.*' |
| grep -o '[0-9]*' |
| grep -m 1 '[0-9]*'` |
| # Do remote work over ssh here.. |
| curl -s -u $CREDS -X DELETE |
| https://cloudapi.acquia.com/v1/sites/'${DOCROOT}'/sshkeys/'${SSHID}'.json |
| -o /dev/null |
| rm -rf ./script.key* |
| #!/bin/bash |
| # Github |
| TOKEN='your-token'# must have admin:public_key for DELETE |
| ssh-keygen -q -b 4096 -t rsa -N '' -f ./script.key |
| PUBKEY=`cat ./script.key.pub` |
| RESPONSE=`curl -s -H 'Authorization: token ${TOKEN}' |
| -X POST --data-binary '{'title':'nr@blackhole','key':'${PUBKEY}'}' |
| https://api.github.com/user/keys` |
| KEYID=`echo $RESPONSE |
| grep -o ''id.*' |
| grep -o '[0-9]*' |
| grep -m 1 '[0-9]*'` |
| echo'Public key deployed to remote service.' |
| # do some work here |
| sleep 10 |
| curl -s -H 'Authorization: token ${TOKEN}' -X DELETE |
| https://api.github.com/user/keys/${KEYID} |
| -o /dev/null |
| echo'Public key removed from remote service.' |
| rm -rf ./script.key* |
Designed for agility and power, Acquia Cloud provides the tools and services that enable you to build and manage digital solutions at scale. You can generate an SSH key pair directly in cPanel, or you can generate the keys yourself and just upload the public one in cPanel to use with your hosting account. When generating SSH keys yourself under Linux, you can use the ssh-keygen command.
On Windows, you can create SSH keys in many ways. This document explains how to use two SSH applications, PuTTY and Git Bash.
Joyent recommends RSA keys because the node-manta CLI programs work with RSA keys both locally and with the ssh agent. DSA keys will work only if the private key is on the same system as the CLI, and not password-protected.
PuTTY is an SSH client for Windows. You can use PuTTY to generate SSH keys. PuTTY is a free open-source terminal emulator that functions much like the Terminal application in macOS in a Windows environment. This section shows you how to manually generate and upload an SSH key when working with PuTTY in the Windows environment.
PuTTY is an SSH client for Windows that you will use to generate your SSH keys. You can download PuTTY from www.chiark.greenend.org.uk.
When you install the PuTTY client, you also install the PuTTYgen utility. PuTTYgen is what you will use to generate your SSH key for a Windows VM.
| This page gives you basic information about using PuTTY and PuTTYgen to log in to your provisioned machine. For more information on PuTTY, see the PuTTY documentation |
|---|
To generate an SSH key with PuTTYgen, follow these steps:
Now you must import the copied SSH key to the portal.
PuTTY and OpenSSH use different formats of public SSH keys. If the text you pasted in the SSH Key starts with —— BEGIN SSH2 PUBLIC KEY, it is in the wrong format. Be sure to follow the instructions carefully. Your key should start with ssh-rsa AAAA….
Once you upload your SSH key to the portal, you can connect to your virtual machine from Windows through a PuTTY session.
The Git installation package comes with SSH. Using Git Bash, which is the Git command line tool, you can generate SSH key pairs. Git Bash has an SSH client that enables you to connect to and interact with Triton containers on Windows.
To install Git:
However, we hope that at least one or two of them will inspire the unique name for which you are looking.If none of these 'words' helps you choose a name, click on the More Generated Words button to get a fresh batch of computer generated words. Domain name generator by keywords.
When the installation completes, you may need to restart Windows.
To open Git Bash, we recommend launching the application from the Windows command prompt:
C:Program FilesGitbinbash.exe and press Enter.First, create the SSH directory and then generate the SSH key pair.
One assumption is that the Windows profile you are using is set up with administrative privileges. Given this, you will be creating the SSH directory at the root of your profile, for example:
Change into the .ssh directory C:Usersjoetest.ssh
To upload the public SSH key to your Triton account:

When Triton finishes the adding or uploading process, the public SSH key appears in the list of SSH keys.
triton-docker command line tool.