@viper do you mean that you are trying to use the screencast option of magic-device-tool?
I have not used it myself but it looks like you need to have set up a public key for ssh for it to work.
Here's the explanation of how it works from Github
"This tool will start ssh on your connected Ubuntu Touch device, forward a local
port to the device, copy your ssh id down to the device (so you can log in
without a password), and then ssh into the device through the locally forwarded
port.
This results in a very nice shell, which for example can display the output of
'top' at the correct terminal size, rather than being stuck at 80x25 like 'adb
shell'
Like ssh-copy-id, this script will push down the newest ssh key it can find in
~/.ssh/*.pub, so if you find the wrong key being pushed down, simply use 'touch'
to make your desired key the newest one, and then this script will find it.
The '--copy' option will make it copy your .bashrc down to the device, giving
you the benefit of preserving your $PS1 (prompt) and any aliases and functions
you may have defined on your host system. "
Here's some documentation on setting up SSH/OpenSSH/Keys from Ubuntu.
I hope that this helps.