digitalocean / digitalocean/doctl

Not able to add droplet IP to known_hosts on Linux

Open
#720 2 comments 0 reactions 1 assignee Claimed by @bentranter View on GitHub
Needs Investigation snap
Dominant language
Go
Stars
3.4k
Forks
496
Avg merge
1d 2h
Merged PRs (30d)
31

Description

I installed doctl trough snap ```sudo snap install doctl``` and then I give it permissions ```sudo snap connect doctl:ssh-keys :ssh-key```.

But if I try to enter to my droplet via doctl using ```doctl compute ssh _droplet-name_``` it fails to add droplet's IP to the list of known hosts, while if I enter with ssh it works as intended ```ssh -q root@__droplet-ip__ exit```.

Doctl gives the following message:
```
The authenticity of host '__droplet-ip__' can't be established.
ECDSA key fingerprint is SHA256:__droplet-sha__.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/username/.ssh/known_hosts).
```
And then continues:
```
Enter passphrase for key '/home/username/.ssh/__keyname__': [...]
```

Is Doctl able to add droplet's IP to the list of known hosts right now? Is this a bug related to Snap/Linux or isn't a present feature?

By the waty, my specs ```npx envinfo``` are the following:
```
System:
OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
Container: Yes
Shell: 3.0.2 - /usr/bin/fish
Binaries:
Node: 13.2.0 - ~/.config/nvm/13.2.0/bin/node
Yarn: 1.19.1 - /usr/bin/yarn
npm: 6.13.1 - ~/.config/nvm/13.2.0/bin/npm
Utilities:
Make: 4.2.1 - /usr/bin/make
GCC: 8.3.0 - /usr/bin/gcc
Git: 2.20.1 - /usr/bin/git
Virtualization:
Docker: 18.09.7 - /usr/bin/docker
VirtualBox: 6.0.14 - /usr/bin/vboxmanage
Languages:
Bash: 5.0.3 - /bin/bash
Perl: 5.28.1 - /usr/bin/perl
Python: 2.7.16 - /usr/bin/python
Ruby: 2.5.5 - /usr/bin/ruby
Databases:
MongoDB: 4.0.13 - /usr/bin/mongo
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.