rapidloop / rtop

rtop is an interactive, remote system monitoring tool based on SSH
Other
2.12k stars 161 forks source link

Password based authentication not available #8

Open kraf opened 9 years ago

kraf commented 9 years ago

On the homepage it says that I can authenticate with a password but I keep getting this error:

unable to authenticate, attempted methods [none publickey], no supported methods remain

I don't see a hidden flag in the config and I can't set it in my .ssh/config.

mdevan commented 9 years ago

Password auth is available only if rtop has a pty. How are you running it?

kraf commented 9 years ago

I'm running it from the terminator terminal emulator with zsh. I just now tried bash and konsole (which comes with KDE) and screen but still no luck. I have OpenSuse 12.3 here at work. I will try again at home with a different setup to help isolate the issue.

mdevan commented 9 years ago

See sshhelper.go#addPasswordAuth. It adds password auth to the list of auth mechanisms only if terminal.IsTerminal(0) is true. (Where terminal is golang.org/x/crypto/ssh/terminal and 0 is the stdin fd).

This is to prevent piping in passwords and to be able to put the terminal in raw mode so the password can be read in without echo.

You need to figure out why terminal.IsTerminal(0) is returning false for your setup.

bdaniel7 commented 9 years ago

Same problem occurs on Windows 7, using rtop 1.0 with Go 1.5.1. rtop is running in command prompt (cmd.exe).

rtop: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

ghost commented 4 years ago

I'm also able to replicate bdaniel7's issue on my Windows 10 Pro computer.