Special Case: Create ssh login instance
SSH repo
fork GitHub repo: https://github.com/sonic-chain/sdk-demo
On your local computer, generate ssh key with
ssh-keygen -t rsa -b 4096Copy the public key as the value of sshkey in deploy.yaml
version: "2.0"
type: node-port
services:
vm:
image: filswan/ubuntu-ssh-user:22.04
env:
- sshkey=<YOUR-LOCAL-SSH-KEY>
- username=swantouser
expose:
- port: 22
- port: 30002
- port: 30003
- port: 30004
- port: 30005
- port: 30006
- port: 30007
deployment:
vm:
lagrange:
count: 1Push modification to your GitHub repo
Deploy SSH Application with Swan SDK
Choose a computing provider who can support SSH application
In the output of available resources list, choose a cp_account_address in ssh_ready list of the instance type you want (such as C1ae.small):
Deploy SSH application with the selected CP
Deploy the SSH application to use that cp_account_address, put it in the preferred_cp_list.
Please wait for awhile to get the SSH command by
If everything goes well, you will get SSH command result like this:
Then you can run this command in your shell. You will see something like the following output:
Last updated