LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (http://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   [HELP] Trying to connect to my server via "ConnectBot" (http://www.linuxquestions.org/questions/linux-mobile-81/%5Bhelp%5D-trying-to-connect-to-my-server-via-connectbot-801123/)

reneg4d3 04-09-2010 04:21 PM

[HELP] Trying to connect to my server via "ConnectBot"
 
Hello all, I have a problem. I am using the Motorola Droid running the latest android distro.

What I am trying to do is connect to my server using an application called "ConnectBot" the problem is I am getting a weird message:

Code:

Connecting to myserver.com:22 via ssh
Verified host 'RSA' key: 7F:33:e6:3f:56:93:b5:76:f6:1b:c4:71:40:5a:b0:5f
Using algorithm: aes256-ctr hmac-sha1-96
Trying to authenticate
Attempting 'keyboard-interactive' authentication
Authentication method 'keyboard-interactive' failed
Trying to authenticate
Attempting 'password' authentication

Then it asks me for a password.... yet I haven't even specified a user.

I have tried it with specifying the username still get the same message.

Any help or knowledge on this matter would be greatly appreciated.

-Reneg4d3

Hangdog42 04-10-2010 07:28 AM

Can you create an SSH connection with something other than ConnectBot? Does the server use keys instead of username/password (my experience is that ConnectBot is a little weird about keys)? Have you looked in the SSH server logs to see if there are any clues there? You also might go through the ConnectBot entry for your server (just long-press the line to edit) and see if anything odd jumps out there. It kind of looks like ConnectBot isn't reaching your server, but that is really a guess.

reneg4d3 04-23-2010 02:44 AM

Connecting to isnet-s1.pennylesshosting.com:22 via sshVerified host 'RSA' key: 7f:33:e6:3f:56:93:b5:76:f6:1b:c4:71:40:5a:b0:5f
Using algorithm: aes256-ctr hmac-sha1-96
Trying to authenticate
Attempting 'keyboard-interactive' authentication
Authentication method 'keyboard-interactive' failed
Trying to authenticate
Attempting 'password' authentication


That's the message I get. When I use iSSH on iPhone it works, but for some reason it doesn't connect on ConnectBot

Hangdog42 04-23-2010 07:03 AM

Quote:

When I use iSSH on iPhone it works, but for some reason it doesn't connect on ConnectBot
Well, that means that the SSH server is working.

Are you trying to do this over 3G or over wireless? Also, have you looked at the log files on your SSH server to see if it is complaining about anything?

reneg4d3 04-24-2010 01:47 AM

Quote:

Originally Posted by Hangdog42 (Post 3945082)
Well, that means that the SSH server is working.

Are you trying to do this over 3G or over wireless? Also, have you looked at the log files on your SSH server to see if it is complaining about anything?

I am doing it over 3g however same thing applies when I do it over wireless.

I checked a few logs, didn't find anything unusual. Any specific log I should check?

I am running CentOS Linux 2.6.33-grsec-IS

Hangdog42 04-24-2010 07:27 AM

I'm not sure what logs CentOS uses, but on Slackware it is /var/log/syslog or /var/log/messages. Have a look in /var/log and look for entries with ssh in them as sshd is usually very good about identifying its entries.

Quote:

I am doing it over 3g however same thing applies when I do it over wireless.
Are you using a domain name or an IP address as the target? I'm trying to figure out if this is somehow a DNS problem. I know it shouldn't be since an iPhone works, but it is still worth ruling out for the Droid. You might try pinging your ssh server and see if your Droid can actually see it (there is at least on decent free ping app in the Market).

reneg4d3 04-24-2010 12:01 PM

Quote:

Originally Posted by Hangdog42 (Post 3946224)
I'm not sure what logs CentOS uses, but on Slackware it is /var/log/syslog or /var/log/messages. Have a look in /var/log and look for entries with ssh in them as sshd is usually very good about identifying its entries.



Are you using a domain name or an IP address as the target? I'm trying to figure out if this is somehow a DNS problem. I know it shouldn't be since an iPhone works, but it is still worth ruling out for the Droid. You might try pinging your ssh server and see if your Droid can actually see it (there is at least on decent free ping app in the Market).

I know it is connecting to the server because when I take my phones IP out of the whitelist I get a connection refused error instead of the one I listed in my first post. Also I am connecting using a domain name.

Hangdog42 04-24-2010 01:31 PM

Quote:

I know it is connecting to the server because when I take my phones IP out of the whitelist I get a connection refused error instead of the one I listed in my first post. Also I am connecting using a domain name.
OK, that is good. However it does mean that your ssh server is rejecting the connection for some reason, and I'm hoping it is putting that reason in the log file.

fak 04-29-2010 06:50 AM

As indicated by the program at startup, you need to give your server adress and user name in the hosts dialog like this:

Code:

username@mydomain.com
if you just enter mydomain.com, the connection will be set up with whatever user account android is running by default.

This behavior is also standard for ssh when launching it from a standard linux shell.

The messages from connect bot look perfectly okay as I am using the program too, what happens AFTER you enter your password?

Gew 05-08-2011 02:41 PM

Any news? Got a Samsung Galaxy. App 'ConnectBot' installed fine, and goes through connection procedures (from what it seems) just fine. Only it refuses to let me in, i.e. says "password authentication failed" although I _know_ I have entered the correct password. Also, I can connect just fine from other places eg. via PuTTY. Also, passphrase contains no non-ASCII characters, so it better not be some coding issue. Ideas?

c4str4t0 09-04-2011 08:10 PM

Not sure if you still look at this thread, but it's probably trying to log in as your root user, and your ssh server config likely has root login access disabled (and it should remain that way). To specify the username logging in to your SSH server, open ConnectBot and put your username in front of the servername followed by '@'.

So:

username@hostname.domain.com:portnumber

the ":portnumber" isn't needed, but I obfuscate my ssh server port to avoid all the random hits from port scans resulting from having port 22 public. If you use the standard tcp port (22), then you can leave the last part off.

So:

username@hostname.domain.com

Based on your question and if this solves your problem, you might want to read up on how to harden your SSH server config to avoid being exploited.

Good luck!


All times are GMT -5. The time now is 05:16 PM.