Jump to content

SSH a no go


red
 Share

Recommended Posts

Howdy folks,

 

Trying to use Putty to connect via ssh to a 9.2 box running as a firewall/router. Cannot get these 2 to talk. I keep getting connection closed by remote host.

 

I have checked and dbl checked firewall settings so that the local network can connect to port 22 on the firewall. this is proven (at least I think) by disabling that rule and reatarting shorewall, i get connection refused instead of connection closed, making me beleive i am communicating in one form or another.

 

Some guidance woudl be appreciated.

 

I have searched the boards but since "ssh" is too small a string, it returns no results.

 

Thanks,

 

RED

 

P.S. I would also like to use a remote X session or VNC...Thanks.

Link to comment
Share on other sites

Thanks!

 

Well, as it turned out, I thought I had the SSH server installed but appearantly did not. Now that i have totally fubar's the config file. I cannot tell if I am coming or going.

 

From other posts I have found you asking for some output we.. her eis my output from running ssh-v 192.168.0.1 at a console on the drake box.

ssh -v 192.168.0.1

OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090702f

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Applying options for *

debug1: Rhosts Authentication disabled, originating port will not be trusted.

debug1: Connecting to 192.168.0.1 [192.168.0.1] port 22.

debug1: Connection established.

debug1: identity file /root/.ssh/identity type -1

debug1: identity file /root/.ssh/id_rsa type -1

debug1: identity file /root/.ssh/id_dsa type -1

ssh_exchange_identification: Connection closed by remote host

debug1: Calling cleanup 0x80627f0(0x0)

 

What can you tell me about this beast?

 

Thanks.

 

RED

Link to comment
Share on other sites

Looks like you successfully connected to the box as root. Is thata what you were trying to do?

 

There are a couple of ways you can tell if you're connected. The first would be to change the hostname of one or both computers. The second would be to change the color/appearance of the bash prompt. Steve Scrimpshire posted a great link in this thread to a site that I always use to customize my prompts. The site I always use is this one

 

Hope this is what you are looking for.

Link to comment
Share on other sites

Well, not really.

 

What I really want is to be able to connect via putty from my windows box so i can disconnect the monitor/kbd/mouse from the linux box. Problem is, I can never get the session stay connected, I get "Conection closed by remote host" every time I try to connect.

 

I have made sure port 22 from the local network to the linux box is open, again this seems to be proven by the fact that before I opened it, I received "connection refused" messages from Putty.

 

Thanks for the help.

 

RED

Link to comment
Share on other sites

depending on what your security is set at you will have to add something in your /etc/hosts.allow

 

sshd:ALL

 

this will make it so that whereever you are you can ssh into the box. if you only want it so that you can get there from your windows box then put that ip in.

 

another thing, if your going to use the auto login, keygen, then you will have to uncomment out the AuthorizedKeyFiles line. put your auth key, the pub one, in there and your set.

 

now if you don't want to be able to get in as root, have to get in as a user and then su (better security), then change the PermitRootLogin no, or you can have it without-passwd. this will make it so that root can't log in with a typed passwd, you would have to generate a key for it.

 

cheers.

 

edit: for all of the commands that are in the /etc/ssh/sshd_config file just look at the man pages for them. they will give an overview of the commands for each one, specifications that is. this will let you fine tune your sshd to your liking.

 

oh, and do make sure that you can log in through ssh a couple of times before disconnnecting your kvm. i had to set mine back up a couple of times. do a couple of reboots on the mdk box also before the disconnect. this will make sure that everything is working properly.

Edited by emetib
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...