Sign in to follow this  
Followers 0
Mindovermaster

SSH (Simple Sharing Help)

33 posts in this topic

Not sure it takes bill gates to look at output of what ports your services are listening on, when your config says it should be listening on port 22, and you don't see anything listening on that port?? It ain't rocket science that is for damn sure!

so what is the output of

service ssh status?

again example because you have a hard time understanding what I am asking

budman@ubuntu:~$ sudo service ssh status

ssh start/running, process 25526

budman@ubuntu:~$

You clearly dicked with your sshd_config with that

"AllowUser rick"

Entry -- maybe that jacks it up from listening? But can not connect to something that is not listening. Why did you dick with your config before it was even working. As you notice you didn't dick with your latop config and works fine. How about you just install Mint 14 and not dick with anything you clearly don't understand this time ;)

Share this post


Link to post
Share on other sites

I'm new to this, don't treat me like an intelligent donkey. :p

I was looking around, and I saw that you need "sudo service start" to start SSH. You never told me how to start it.

So right now:


david@david-ubuntu:~$ sudo service ssh status
[sudo] password for david:
ssh start/running, process 8040
[/CODE]

This where I got the guide: https://help.ubuntu.com/community/SSH/OpenSSH/Configuring

With that, I tried to "[size=4]Specify Which Accounts Can Use SSH"[/size]

Share this post


Link to post
Share on other sites

What do you think a restart does when you ran that, and I pointed out you didn't have a sudo in the command in post 2 of this thread

So is it listening now? Or do you need another example on how to check that? Did you fix your config file with the correct allowusers vs allowuser?

Guess reading the troubleshooting section got loss in all the words in the guide?

https://help.ubuntu.com/community/SSH/OpenSSH/Configuring#Troubleshooting

So per your guide and the troubleshooting section of it. Now that you have started ssh is it running?

example from my working box

budman@ubuntu:~$ ps -A | grep sshd

13959 ? 00:00:00 sshd

14090 ? 00:00:00 sshd

25526 ? 00:00:00 sshd

budman@ubuntu:~$

See it listening on port 22

budman@ubuntu:~$ sudo ss -lnp | grep sshd

[sudo] password for budman:

LISTEN 0 128 :::22 :::* users:(("sshd",25526,4))

LISTEN 0 128 *:22 *:* users:(("sshd",25526,3))

This is a much better command vs netstat that gives more information and could be overwhelming to some users I guess ;)

Share this post


Link to post
Share on other sites

OK, so I can SSH from my laptop to my desktop, no problem. BUT when I try to connect from my desktop to my laptop, I get this:


david@david-ubuntu:~$ ssh david@192.168.0.188
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
4f:04:36:79:78:bb:68:a9:13:70:4f:a3:01:73:49:f2.
Please contact your system administrator.
Add correct host key in /home/david/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/david/.ssh/known_hosts:1
remove with: ssh-keygen -f "/home/david/.ssh/known_hosts" -R 192.168.0.188
ECDSA host key for 192.168.0.188 has changed and you have requested strict checking.
Host key verification failed.
[/CODE]

Share this post


Link to post
Share on other sites

as it suggests in the error run "

ssh-keygen -f "/home/david/.ssh/known_hosts" -R 192.168.0.188"

then try again and it should work, it just means that the key on the laptop has changed and you need to delete the old saved one on your desktop first (which is what that command will do)

Share this post


Link to post
Share on other sites

Lots of different reasons why the key could of changed, did you reinstall sshd on your desktop. Did you install/reinstall OS? Was some other box that you had ssh'd too have been on the same IP at one point?

If your sure your connecting to the correct box, then as suggested just remove the OLD host key from your laptop for the desktop and then you won't get the error. This shows that the desktop is now atleast listening on 22 ;)

Or maybe desktop is not listening still, and your connecting to some other box that now has that IP and is running sshd - that too would explain the host key mismatch.

What did you do to correct that, did you edit the config file with the bad allowuser statement? Or just the start/restart of sshd?

Share this post


Link to post
Share on other sites

How do I remove the old host keys?

these are my IPs listed on my router:


IP Address Name (if any) MAC
192.168.0.164 NEXUS-NAS-BOX 14:d6:4d:54:84:f0
192.168.0.184 NP-13C237003570 cc:6d:a0:61:df:b5
192.168.0.188 david-lappy c0:f8:da:63:f0:c5
192.168.0.193 Mom7 00:1f:1f:90:d3:5f
192.168.0.195 Gigabyte 00:1f:d0:d1:37:2b
192.168.0.196 david-ubuntu f4:6d:04:f0:58:f8
[/CODE]

david-lappy and david-ubuntu is what I'm trying to connect. The IP has not changed.

Both systems have SSH running, checked the status.

Correct what, the connection from my laptop to desktop? nothing...

Share this post


Link to post
Share on other sites

Oh, thanks, Brando. Didn't see your post there on page 2. Yeah, it worked after I did that ssh-keygen.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.