Xmouse app and PAM/SSH

Father Grigori

New Member

Reaction score: 3
Messages: 11

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,969
Messages: 31,368

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,969
Messages: 31,368

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,969
Messages: 31,368

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.
 
OP
OP
Father Grigori

Father Grigori

New Member

Reaction score: 3
Messages: 11

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.
 
OP
OP
Father Grigori

Father Grigori

New Member

Reaction score: 3
Messages: 11

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.
 
Top