Special Case: Create ssh login instance

SSH repo

  1. fork GitHub repo: https://github.com/sonic-chain/sdk-demo

  2. On your local computer, generate ssh key with ssh-keygen -t rsa -b 4096

  3. Copy 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: 1
  1. Push modification to your GitHub repo

Deploy SSH Application with Swan SDK

  1. 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):

  1. 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