Re: broken ssh



On 06/13/2010 08:10 AM, Karl Auer wrote:
On Sun, 2010-06-13 at 07:44 -0400, Mark C. Miller wrote:
During my school year, I was able to ssh into my box which, has a domain
name assigned by DYNDNS. I used "Places>>Connect to server" to do this.
Connectivity ceased the last week of May while running 9.10. Now, when I
try that, it connects (accepts my login ID), but stops at the password.

Does this mean that after entering the password, it "hangs" (no further
output) or that it does not accept the password, saying "try again", or
that it never issues a password prompt at all?

Sorry I wasn't clear (and I thought I had done such a good job ;>O

The pas word is stuck in a loop. It asks for the password, when I enter
it, it returns to ask for the password.


I use the same password that I use to login under that system ID on
the box itself. The password works to login to the system directly.
I've tried loogging in from the command line: "ssh
eyore15@xxxxxxxxxxxxxxxxxxx" works. It then asks for my password and
then will not accept the assigned password for the system. I also:

So does it work or not? You say it works, but in the same sentence that
it will not accept your password. Which is true?

The password works to log in to the machine directly at a normal login.
That same password is not accepted by ssh


Here is what needs to be in place on the target machine:

1. Make sure the package openssh-server is installed.

2. Make sure the sshd daemon is running (ps ax | grep sshd)

663 ? Ss 0:0 /ussr/sbin/sshd

3. Make sure sshd is on port 22 (netstat -an | grep 22 | grep "^tcp")

tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN
tcp 0 0 192.168.1.104:48453 80.91.229.10:119
ESTABLISHED
tcp 0 0 192.168.1.104:48454 80.91.229.10:119
ESTABLISHED
tcp6 0 0 :::22 :::* LIST


4. Make sure that your home router port forwards port 22
(or whatever port you like) to port 22 on the target computer.


Done


Now try to ssh to the target computer locally (i.e., from itself, while
logged in on a console or X terminal). Wait AT LEAST two minutes before
giving up - the server could be doing an ident check or reverse DNS
lookup.


this works ssh eyore.homelinux.net logins in


If the local login works (eventually) everything is OK. If there was a
big delay, check the sshd-config settings to make sure it doesn't do
ident and DNS checks, which are pointless anyway.

Then try a remote login (i.e., from a different computer).

This does not work



If you never get a prompt, suspect a firewall.

I get the prompt for userid and password. I enter userid and get the
prompt for password. I enter the password, the prompt returns to
"password".


If your password is rejected, check the sshd-config settings, make sure
connections are permitted from your IP address etc.

I'm not quite sure how to do this




Make sure, when you attempt a remote ssh login, that you are logging in
from an account with the same name as on the target computer, OR specify
the target account name explicitly (i.e.m ssh myname@xxxxxxxxx) You'd me
amazed how often people forget they are logged in as arthur when they
try to connect to the account martha, and can't figure out why the
password is rejected...

I've double check myself to make sure this not the case.



c. Reset the ssh port forwarding for port 22 to match the new port
(192.168.1.104)assigned after rebooting the router

I don't understand that, but it sounds wrong.

This how the router was set up back when it was working. If I understand
this, the "eyore.homelinux.net" assigned by dyndns gets the outside user
to the router. From there port 22 (ssh) needs to be forwarded so that
the router processes any login attempts to the correct computeer
(192.198.1.104)



f. No knowing if it made a difference or not, I turned off security in
"Preferences>>Remote Desktop"

No - it doesn't make a difference to ssh. Turn it back on.

g. Installed Ubuntu 10.04

Where? If on the target computer, you have certainly changed the sshd
settings, and should check them again. In fact, a default desktop
install of 10.04 does not have the ssh server installed by default! That
would explain a lot, though I'd have thought you would be seeing
"connection refused" error messages.

The target computer is running 10.04. I installed "ssh" from the
repositories which is both the client and server side. The computer I
am using to attempt the logins is also 10.04, and also has "ssh" installed



h. Deleted/reinstalled ssh from the repositories (used Synaptic if that
makes a difference)

Where? On the target or your local machine?


Both


Please cut and paste an actual login attempt (obviously don't paste the
actual password or passphrase you use). We need to see what exactly you
are trying to do.

mark@eyore:~$ ssh eyore15@xxxxxxxxxxxxxxxxxxx
eyore15@xxxxxxxxxxxxxxxxxxx's password:
Permission denied, please try again.
eyore15@xxxxxxxxxxxxxxxxxxx's password:
Permission denied, please try again.
eyore15@xxxxxxxxxxxxxxxxxxx's password:
Permission denied (publickey,password).
mark@eyore:~$


Regards, K.



Thanks for the assist

--
Mark C. Miller
eyore15@xxxxxxxxxxx


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Security basics
    ... login password which was my last name. ... run ssh on some port other than 22. ... can detect ssh implementations since they normally self-identify. ...
    (Fedora)
  • Re: Security basics
    ... login password which was my last name. ... run ssh on some port other than 22. ... can detect ssh implementations since they normally self-identify. ...
    (Fedora)
  • Re: broken ssh
    ... Connectivity ceased the last week of May while running 9.10. ... The password works to login to the system directly. ... Now try to ssh to the target computer locally (i.e., from itself, while ...
    (Ubuntu)
  • Re: Block ssh login prompt for *.kr *.jp etc.
    ... >to be PROMPTED for a login. ... You probably want your whole machine to be invisible, not just the SSH ... Block as much as you can at the router. ... Consider running SSH on a non-standard port. ...
    (comp.security.ssh)
  • Re: SSH port 22 is invisible from the internet!! :(
    ... I want to allow a remote user to login with ssh on to my system. ... I use iptables as a firewall and have added a rule to open the port 22: ...
    (Debian-User)