Skip to content

Instantly share code, notes, and snippets.

@ixxie
Last active April 22, 2020 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ixxie/aa68ba0e1fd507fc7fda9d7a6b6aff64 to your computer and use it in GitHub Desktop.
Save ixxie/aa68ba0e1fd507fc7fda9d7a6b6aff64 to your computer and use it in GitHub Desktop.

Github Action works in its own repo but not from another repo

I'm having trouble with a remote call of a github action. The issue concerns an action I created called nixosify which is designed to install my Linux distro of choice on a remote machine. The action accepts four parameters:

  • target: ip of the machine to convert
  • tempkey: private key to grant access to the target
  • tempkey_pub: the temporary public key, used to add to the install medium
  • authkey_pub: a permanent public key to add to authorized keys on the target, post install

As you can see in this successful execution of a test workflow this all seems good and well. The test workflow uses a VPS provider's CLI to create an test instance, run the test, and kill it.

The trouble starts whenever I try to use the action in a workflow in a seperate repository. First I tried to use the action on this repo which is supposed to deploy a minecraft server. The workflow run attempts fail due to SSH Connection refused errors. This makes me suspect I am possibly passing the keys wrong; however, the calls of the action are practically identical except for the action being references elsewhere in the later case while being called locally in the former case.

To double check this is a reference issue, I clone the original repo and made the minimal modifications needed to make it work in the new context (see diff below), remembering to add all the needed secrets to both the repo and the VPS provider. Alas, the all-but-identical workflow fails in this new context, again with SSH Connection refused errors.

The diff:

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e216eb5..19704f1 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,7 +1,7 @@
 on: [push]
 
 env:
-  prefix: 'test-nixosifyB'
+  prefix: 'test-nixosify'
   HCLOUD_TOKEN: ${{ secrets.hcloud_token }}
 
 jobs:
@@ -34,7 +34,7 @@ jobs:
               --name ${name} \
               --type ${size} \
               --image ${image} \
-              --ssh-key nixosifyB
+              --ssh-key nixosify
             ip=$(hcloud server describe ${name} -o json | jq -r .public_net.ipv4.ip)
             host_info="${host_info}${name}\t${ip}\n"
           done
@@ -48,7 +48,7 @@ jobs:
           echo "$host_ip"
           echo "::set-output name=host_ip::$host_ip"
       - name: Test nixosify
-        uses: sparkletco/nixosify@273e5e6
+        uses: ./
         id: nixosify
         with:
           target: ${{ steps.get-host-ip.outputs.host_ip }}
# convert to nixos
name: 'Convert to NixOS'
description: 'Convert a Debian/Ubuntu machine to NixOS'
inputs:
target: # id of input
description: 'IP of target for conversion'
required: true
tempkey:
description: 'Temporary private key to access the machine to be converted'
required: true
tempkey_pub:
description: 'Temporary public key to access the machine to be converted'
required: true
authkey_pub:
description: 'Authorized SSH key to include in the NixOS machine'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.target }}
- ${{ inputs.tempkey }}
- ${{ inputs.tempkey_pub }}
- ${{ inputs.authkey_pub }}
on: [push]
env:
prefix: 'test-nixosify'
HCLOUD_TOKEN: ${{ secrets.hcloud_token }}
jobs:
test-nixosify:
runs-on: ubuntu-latest
name: Test nixosify action
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install depedencies
env:
hcloud_binary: https://github.com/hetznercloud/cli/releases/download/v1.16.2/hcloud-linux-amd64.tar.gz
run: |
curl -L $hcloud_binary --output ./hcloud.tar.gz
tar -xf ./hcloud.tar.gz
sudo cp ./hcloud /usr/local/bin/hcloud
sudo apt-get install jq
- name: Create test servers
id: create-test-servers
env:
number: 1
size: 'cx11'
image: 'ubuntu-18.04'
run: |
host_info=""
for n in `seq ${number}`
do
name="${prefix}-${n}"
hcloud server create \
--name ${name} \
--type ${size} \
--image ${image} \
--ssh-key nixosify
ip=$(hcloud server describe ${name} -o json | jq -r .public_net.ipv4.ip)
host_info="${host_info}${name}\t${ip}\n"
done
echo "::set-output name=host_info::$host_info"
- name: Get host IP
id: get-host-ip
env:
host_info: ${{ steps.create-test-servers.outputs.host_info }}
run: |
host_ip=$(printf $host_info | awk '{print $2}')
echo "$host_ip"
echo "::set-output name=host_ip::$host_ip"
- name: Test nixosify
uses: ./
id: nixosify
with:
target: ${{ steps.get-host-ip.outputs.host_ip }}
tempkey: ${{ secrets.nixosify_key }}
tempkey_pub: ${{ secrets.nixosify_key_pub }}
authkey_pub: ${{ secrets.nixosify_key_pub }}
- name: Delete test servers
if: always()
run: |
hcloud server list -o noheader -o columns=name \
| awk -v pattern="$prefix" '$0 ~ pattern' \
| while read -r host;
do
hcloud server delete $host
done
on: [push]
env:
prefix: 'test-nixosifyB'
HCLOUD_TOKEN: ${{ secrets.hcloud_token }}
jobs:
test-nixosify:
runs-on: ubuntu-latest
name: Test nixosify action
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install depedencies
env:
hcloud_binary: https://github.com/hetznercloud/cli/releases/download/v1.16.2/hcloud-linux-amd64.tar.gz
run: |
curl -L $hcloud_binary --output ./hcloud.tar.gz
tar -xf ./hcloud.tar.gz
sudo cp ./hcloud /usr/local/bin/hcloud
sudo apt-get install jq
- name: Create test servers
id: create-test-servers
env:
number: 1
size: 'cx11'
image: 'ubuntu-18.04'
run: |
host_info=""
for n in `seq ${number}`
do
name="${prefix}-${n}"
hcloud server create \
--name ${name} \
--type ${size} \
--image ${image} \
--ssh-key nixosifyB
ip=$(hcloud server describe ${name} -o json | jq -r .public_net.ipv4.ip)
host_info="${host_info}${name}\t${ip}\n"
done
echo "::set-output name=host_info::$host_info"
- name: Get host IP
id: get-host-ip
env:
host_info: ${{ steps.create-test-servers.outputs.host_info }}
run: |
host_ip=$(printf $host_info | awk '{print $2}')
echo "$host_ip"
echo "::set-output name=host_ip::$host_ip"
- name: Test nixosify
uses: sparkletco/nixosify@273e5e6
id: nixosify
with:
target: ${{ steps.get-host-ip.outputs.host_ip }}
tempkey: ${{ secrets.nixosify_key }}
tempkey_pub: ${{ secrets.nixosify_key_pub }}
authkey_pub: ${{ secrets.nixosify_key_pub }}
- name: Delete test servers
if: always()
run: |
hcloud server list -o noheader -o columns=name \
| awk -v pattern="$prefix" '$0 ~ pattern' \
| while read -r host;
do
hcloud server delete $host
done
@AndrewMeadows
Copy link

Secrets are a per-repo setting. Has the secrets.hcloud_token been setup for the second repo? It isn't clear from this gist that is the case.

@ixxie
Copy link
Author

ixxie commented Apr 20, 2020

Yes @AndrewMeadows, all needed secrets have been added.

Indeed you can see from the logs of the workflow runs that the token works, because the step for creating the machine succeeds without trouble. It is the subsequent step - attempting to connect to the machine and install the OS - which fails due to SSH connectivity errors.

@AndrewMeadows
Copy link

You can make ssh be verbose: ssh -v -v -v (up to three -v's, each one increasing the verbosity). You will gain some clues as to why it fails.

@ixxie
Copy link
Author

ixxie commented Apr 21, 2020

@AndrewMeadows - good idea... I tried this now, see full execution logs here, but I don't know what to make of it.

Here is the beginning of the SSH bit:

2020-04-21T15:31:57.7146644Z 
2020-04-21T15:31:57.7148480Z <<�[208mPass keys�[39m>>
2020-04-21T15:31:57.7148895Z 
2020-04-21T15:31:57.7187630Z Executing: program /nix/store/kvs141bghs5df70n6f4zlsida1384ffw-openssh-7.9p1/bin/ssh host 95.217.1.159, user root, command scp -v -t /ssh_pubkey
2020-04-21T15:31:57.7188241Z 
2020-04-21T15:31:57.7189136Z <<�[208mMove key to target�[39m>>
2020-04-21T15:31:57.7189390Z 
2020-04-21T15:31:57.7221312Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:31:57.7338010Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:31:57.7344261Z debug2: ssh_connect_direct
2020-04-21T15:31:57.7344757Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:05.0350900Z debug1: connect to address 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.0355618Z ssh: connect to host 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.0360878Z lost connection
2020-04-21T15:32:05.0362721Z 
2020-04-21T15:32:05.0365580Z <<�[208mCopy nixos kexec tarball�[39m>>
2020-04-21T15:32:05.0370891Z 
2020-04-21T15:32:05.0392809Z Executing: program /nix/store/kvs141bghs5df70n6f4zlsida1384ffw-openssh-7.9p1/bin/ssh host 95.217.1.159, user root, command scp -v -t /
2020-04-21T15:32:05.0432889Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:32:05.0433437Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:32:05.0433953Z debug2: ssh_connect_direct
2020-04-21T15:32:05.0434528Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:05.1573236Z debug1: connect to address 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.1574568Z ssh: connect to host 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.1586152Z lost connection
2020-04-21T15:32:05.1593977Z 
2020-04-21T15:32:05.1596959Z <<�[208mBooting into NixOS with kexec�[39m>>
2020-04-21T15:32:05.1597453Z 
2020-04-21T15:32:05.1635732Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:32:05.1636291Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:32:05.1636903Z debug2: ssh_connect_direct
2020-04-21T15:32:05.1637370Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:05.2809959Z debug1: connect to address 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.2811551Z ssh: connect to host 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.2825212Z 
2020-04-21T15:32:05.2827042Z <<�[208mWaiting for kexec to boot up NixOS�[39m>>
2020-04-21T15:32:05.2827514Z 
2020-04-21T15:32:45.4061832Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:32:45.4065994Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:32:45.4066520Z debug2: ssh_connect_direct
2020-04-21T15:32:45.4066973Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:45.5193350Z debug1: Connection established.
2020-04-21T15:32:45.5198769Z debug1: identity file /tempkey type 0
2020-04-21T15:32:45.5203437Z debug1: identity file /tempkey-cert type -1
2020-04-21T15:32:45.5208217Z debug1: Local version string SSH-2.0-OpenSSH_7.9
2020-04-21T15:32:45.6383514Z debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
2020-04-21T15:32:45.6384717Z debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
2020-04-21T15:32:45.6385379Z debug2: fd 3 setting O_NONBLOCK
2020-04-21T15:32:45.6386000Z debug1: Authenticating to 95.217.1.159:22 as 'root'
2020-04-21T15:32:45.6386498Z debug3: hostkeys_foreach: reading file "/dev/null"
2020-04-21T15:32:45.6391015Z debug3: send packet: type 20
2020-04-21T15:32:45.6391746Z debug1: SSH2_MSG_KEXINIT sent
2020-04-21T15:32:45.7514406Z debug3: receive packet: type 20
2020-04-21T15:32:45.7515288Z debug1: SSH2_MSG_KEXINIT received
2020-04-21T15:32:45.7518233Z debug2: local client KEXINIT proposal
2020-04-21T15:32:45.7521268Z debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
2020-04-21T15:32:45.7523496Z debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
2020-04-21T15:32:45.7524993Z debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7526139Z debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7527455Z debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7528856Z debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7529732Z debug2: compression ctos: none,zlib@openssh.com,zlib
2020-04-21T15:32:45.7530218Z debug2: compression stoc: none,zlib@openssh.com,zlib
2020-04-21T15:32:45.7530689Z debug2: languages ctos: 
2020-04-21T15:32:45.7531670Z debug2: languages stoc: 
2020-04-21T15:32:45.7532113Z debug2: first_kex_follows 0 
2020-04-21T15:32:45.7533097Z debug2: reserved 0 
2020-04-21T15:32:45.7533533Z debug2: peer server KEXINIT proposal
2020-04-21T15:32:45.7534733Z debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
2020-04-21T15:32:45.7535755Z debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
2020-04-21T15:32:45.7536664Z debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7537839Z debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7538970Z debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7540144Z debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7540817Z debug2: compression ctos: none,zlib@openssh.com
2020-04-21T15:32:45.7541290Z debug2: compression stoc: none,zlib@openssh.com
2020-04-21T15:32:45.7546844Z debug2: languages ctos: 
2020-04-21T15:32:45.7547299Z debug2: languages stoc: 
2020-04-21T15:32:45.7547727Z debug2: first_kex_follows 0 
2020-04-21T15:32:45.7548159Z debug2: reserved 0 
2020-04-21T15:32:45.7548945Z debug1: kex: algorithm: curve25519-sha256
2020-04-21T15:32:45.7549577Z debug1: kex: host key algorithm: ecdsa-sha2-nistp256
2020-04-21T15:32:45.7550350Z debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
2020-04-21T15:32:45.7551432Z debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
2020-04-21T15:32:45.7559602Z debug3: send packet: type 30
2020-04-21T15:32:45.7560586Z debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
2020-04-21T15:32:45.9199566Z debug3: receive packet: type 31
2020-04-21T15:32:45.9208954Z debug1: Server host key: ecdsa-sha2-nistp256 SHA256:kTLC14AabXu1MzQu4DukJpGaoQ5Esp91Axlcs1JJhAs
2020-04-21T15:32:45.9209989Z debug3: hostkeys_foreach: reading file "/dev/null"
2020-04-21T15:32:45.9211447Z Warning: Permanently added '95.217.1.159' (ECDSA) to the list of known hosts.
2020-04-21T15:32:45.9247019Z debug3: send packet: type 21
2020-04-21T15:32:45.9247810Z debug2: set_newkeys: mode 1
2020-04-21T15:32:45.9248592Z debug1: rekey after 134217728 blocks
2020-04-21T15:32:45.9249327Z debug1: SSH2_MSG_NEWKEYS sent2020-04-21T15:31:57.7146644Z 
2020-04-21T15:31:57.7148480Z <<�[208mPass keys�[39m>>
2020-04-21T15:31:57.7148895Z 
2020-04-21T15:31:57.7187630Z Executing: program /nix/store/kvs141bghs5df70n6f4zlsida1384ffw-openssh-7.9p1/bin/ssh host 95.217.1.159, user root, command scp -v -t /ssh_pubkey
2020-04-21T15:31:57.7188241Z 
2020-04-21T15:31:57.7189136Z <<�[208mMove key to target�[39m>>
2020-04-21T15:31:57.7189390Z 
2020-04-21T15:31:57.7221312Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:31:57.7338010Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:31:57.7344261Z debug2: ssh_connect_direct
2020-04-21T15:31:57.7344757Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:05.0350900Z debug1: connect to address 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.0355618Z ssh: connect to host 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.0360878Z lost connection
2020-04-21T15:32:05.0362721Z 
2020-04-21T15:32:05.0365580Z <<�[208mCopy nixos kexec tarball�[39m>>
2020-04-21T15:32:05.0370891Z 
2020-04-21T15:32:05.0392809Z Executing: program /nix/store/kvs141bghs5df70n6f4zlsida1384ffw-openssh-7.9p1/bin/ssh host 95.217.1.159, user root, command scp -v -t /
2020-04-21T15:32:05.0432889Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:32:05.0433437Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:32:05.0433953Z debug2: ssh_connect_direct
2020-04-21T15:32:05.0434528Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:05.1573236Z debug1: connect to address 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.1574568Z ssh: connect to host 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.1586152Z lost connection
2020-04-21T15:32:05.1593977Z 
2020-04-21T15:32:05.1596959Z <<�[208mBooting into NixOS with kexec�[39m>>
2020-04-21T15:32:05.1597453Z 
2020-04-21T15:32:05.1635732Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:32:05.1636291Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:32:05.1636903Z debug2: ssh_connect_direct
2020-04-21T15:32:05.1637370Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:05.2809959Z debug1: connect to address 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.2811551Z ssh: connect to host 95.217.1.159 port 22: Connection refused
2020-04-21T15:32:05.2825212Z 
2020-04-21T15:32:05.2827042Z <<�[208mWaiting for kexec to boot up NixOS�[39m>>
2020-04-21T15:32:05.2827514Z 
2020-04-21T15:32:45.4061832Z OpenSSH_7.9p1, OpenSSL 1.1.1d  10 Sep 2019
2020-04-21T15:32:45.4065994Z debug2: resolve_canonicalize: hostname 95.217.1.159 is address
2020-04-21T15:32:45.4066520Z debug2: ssh_connect_direct
2020-04-21T15:32:45.4066973Z debug1: Connecting to 95.217.1.159 [95.217.1.159] port 22.
2020-04-21T15:32:45.5193350Z debug1: Connection established.
2020-04-21T15:32:45.5198769Z debug1: identity file /tempkey type 0
2020-04-21T15:32:45.5203437Z debug1: identity file /tempkey-cert type -1
2020-04-21T15:32:45.5208217Z debug1: Local version string SSH-2.0-OpenSSH_7.9
2020-04-21T15:32:45.6383514Z debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
2020-04-21T15:32:45.6384717Z debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
2020-04-21T15:32:45.6385379Z debug2: fd 3 setting O_NONBLOCK
2020-04-21T15:32:45.6386000Z debug1: Authenticating to 95.217.1.159:22 as 'root'
2020-04-21T15:32:45.6386498Z debug3: hostkeys_foreach: reading file "/dev/null"
2020-04-21T15:32:45.6391015Z debug3: send packet: type 20
2020-04-21T15:32:45.6391746Z debug1: SSH2_MSG_KEXINIT sent
2020-04-21T15:32:45.7514406Z debug3: receive packet: type 20
2020-04-21T15:32:45.7515288Z debug1: SSH2_MSG_KEXINIT received
2020-04-21T15:32:45.7518233Z debug2: local client KEXINIT proposal
2020-04-21T15:32:45.7521268Z debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
2020-04-21T15:32:45.7523496Z debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
2020-04-21T15:32:45.7524993Z debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7526139Z debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7527455Z debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7528856Z debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7529732Z debug2: compression ctos: none,zlib@openssh.com,zlib
2020-04-21T15:32:45.7530218Z debug2: compression stoc: none,zlib@openssh.com,zlib
2020-04-21T15:32:45.7530689Z debug2: languages ctos: 
2020-04-21T15:32:45.7531670Z debug2: languages stoc: 
2020-04-21T15:32:45.7532113Z debug2: first_kex_follows 0 
2020-04-21T15:32:45.7533097Z debug2: reserved 0 
2020-04-21T15:32:45.7533533Z debug2: peer server KEXINIT proposal
2020-04-21T15:32:45.7534733Z debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
2020-04-21T15:32:45.7535755Z debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
2020-04-21T15:32:45.7536664Z debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7537839Z debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
2020-04-21T15:32:45.7538970Z debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7540144Z debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2020-04-21T15:32:45.7540817Z debug2: compression ctos: none,zlib@openssh.com
2020-04-21T15:32:45.7541290Z debug2: compression stoc: none,zlib@openssh.com
2020-04-21T15:32:45.7546844Z debug2: languages ctos: 
2020-04-21T15:32:45.7547299Z debug2: languages stoc: 
2020-04-21T15:32:45.7547727Z debug2: first_kex_follows 0 
2020-04-21T15:32:45.7548159Z debug2: reserved 0 
2020-04-21T15:32:45.7548945Z debug1: kex: algorithm: curve25519-sha256
2020-04-21T15:32:45.7549577Z debug1: kex: host key algorithm: ecdsa-sha2-nistp256
2020-04-21T15:32:45.7550350Z debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
2020-04-21T15:32:45.7551432Z debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
2020-04-21T15:32:45.7559602Z debug3: send packet: type 30
2020-04-21T15:32:45.7560586Z debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
2020-04-21T15:32:45.9199566Z debug3: receive packet: type 31
2020-04-21T15:32:45.9208954Z debug1: Server host key: ecdsa-sha2-nistp256 SHA256:kTLC14AabXu1MzQu4DukJpGaoQ5Esp91Axlcs1JJhAs
2020-04-21T15:32:45.9209989Z debug3: hostkeys_foreach: reading file "/dev/null"
2020-04-21T15:32:45.9211447Z Warning: Permanently added '95.217.1.159' (ECDSA) to the list of known hosts.
2020-04-21T15:32:45.9247019Z debug3: send packet: type 21
2020-04-21T15:32:45.9247810Z debug2: set_newkeys: mode 1
2020-04-21T15:32:45.9248592Z debug1: rekey after 134217728 blocks
2020-04-21T15:32:45.9249327Z debug1: SSH2_MSG_NEWKEYS sent

It goes on like that for while after this...

@AndrewMeadows
Copy link

Lol, I guess you should have just used one -v option. Then you would have only ended up with the "debug1" messages.

AFAICT everything succeeded. The SSH session returns exit status 0 at the very bottom. However, the whole session is cancelled for some reason. Dunno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment