Solved XMouse app and PAM/SSH

Hello all!

I've downloaded an app from F-Droid on my cell phone called Xmouse, in order to use my android device as a remote mouse & keyboard.

The problem is I can't connect to my FreeBSD box from android, because of... PAM... I think.

Whenever I try to connect, Xmouse displays: Error: Auth cancel.

Digging around and using tail to watch /var/log/messages, I found this:
Code:
# tail -f /var/log/messages

Nov  7 12:26:55 alpha sshd[6947]: error: PAM: Authentication error for gregory from 10.1.1.135
Nov  7 12:26:55 alpha sshd[6947]: error: Received disconnect from 10.1.1.135 port 42620:3: com.jcraft.jsch.JSchException: Auth cancel [preauth]

SSH server is working fine, since I can connect from other FreeBSD machines to this one easily.

What am I doing wrong?

I know little about PAM and its modules, so any help would be very much appreciated.

Thank you.
 
The issue has nothing to do with PAM configuration, PAM is simply telling you your authentication doesn't work. Most probably because the password is wrong.
 
Well, something's wrong. If I read the documentation correctly XMouse simply uses a password or a key to login with SSH. There's nothing you need to change or configure on the FreeBSD side, everything is already configured to allow that.
 
I also tried connecting using a key via ssh-keygen(1) and then copying the public part to the android device,
That's the wrong way around. It's the android device that logs in on your FreeBSD machine. So the private key needs to be on the Android and the public key needs to be added to authorized_keys on the FreeBSD side.
 
That's the wrong way around. It's the android device that logs in on your FreeBSD machine. So the private key needs to be on the Android and the public key needs to be added to authorized_keys on the FreeBSD side.

Oh silly me...

Gonna try that again ASAP and report the result back.

Thank you for clarifying that SirDice.
 
I just tested XMouse with a openssh-server enabled Linux Mint box, using the same configuration, and it worked flawlessly...

Definitely it is an issue with FreeBSD.

I'd like to use XMouse with FreeBSD, so any help is appreciated.

Thanks.
 
Helo all...

I was able to connect XMouse to my FreeBSD box now by adding:

PasswordAuthentication yes

to /etc/ssh/sshd_config

It connects but remote mouse & keyboard just do not work.

Maybe something related to the correct initialization command of xdotool in XMouse settings?

Under XMouse´s Settings, after removing the Linux (bash) environmet command, I put this in "initalization command":

setenv DISPLAY 0

Thanks in advance.
 
Helo all...

I was able to connect XMouse to my FreeBSD box now by adding:

PasswordAuthentication yes

to /etc/ssh/sshd_config

It connects but remote mouse & keyboard just do not work.

Maybe something related to the correct initialization command of xdotool in XMouse settings?

Under XMouse´s Settings, after removing the Linux (bash) environmet command, I put this in "initalization command":

setenv DISPLAY 0

Thanks in advance.
Ok, managed to solve it on my FreeBSD notebook using the correct setenv string:

setenv DISPLAY unix:0.0

It is working nicely now.

I´m gonna try it on my workstation...
 
Back
Top