TTY access denied on Ubuntu Core

for using application as sshpass It is necessary to start an interaction with ssh trought tty device.
Actually, snapd block access to tty device and It doesn’t exist an interface to allow this.

debug1: read_passphrase: can’t open /dev/tty: No such device or address

Is it a design choice for snapd or is it possibile overcome this problem wit some instruments offered by ubuntu core?


Can you give exact steps to reproduce? (Including distribution you are using)

thank @jdstrand for your attention.
I am using ubuntu core 16 with snap using sshpass in strict mode.
I run this command from a daemon defined in a snap:

/snap/domotz-kevin/13/usr/bin/sshpass -p pippo /snap/domotz-kevin/13/usr/bin/ssh domotz@ -p 22 -v

we use absolute path only to be sure to use the right executable.
The error is on the :

debug1: read_passphrase: can’t open /dev/tty: No such device or address

I hope tha it is more clear for you


did you ever solve this? Having the same problem…

Can you debug this some more and try to provide us with a little more data on what’s going on?

For example, if you execute your usual command with snap run --shell your.command you’ll find yourself in a shell inside the snap environment, with the same permissions of the actual command you were about to run. From there, if you do ls -l /dev/tty you should find the device available, and you can also run the actual sshpass command as well to explore how it behaves.

Please let us know how it goes.