red Posted January 13, 2004 Report Share Posted January 13, 2004 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. Quote Link to comment Share on other sites More sharing options...
liquidzoo Posted January 13, 2004 Report Share Posted January 13, 2004 2 things. Have you enabled sshd and have you configured it to allow your user? You can do both through webmin on you mandrake box. Head to https://localhost:10000 to access webmin. SSH is in the servers section, I believe. Quote Link to comment Share on other sites More sharing options...
Gowator Posted January 13, 2004 Report Share Posted January 13, 2004 Can you connect on the drake box??? i.e. just ssh to itself ?? Quote Link to comment Share on other sites More sharing options...
red Posted January 14, 2004 Author Report Share Posted January 14, 2004 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.1OpenSSH_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 Quote Link to comment Share on other sites More sharing options...
red Posted January 16, 2004 Author Report Share Posted January 16, 2004 Anyone?? RED Quote Link to comment Share on other sites More sharing options...
liquidzoo Posted January 16, 2004 Report Share Posted January 16, 2004 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. Quote Link to comment Share on other sites More sharing options...
red Posted January 17, 2004 Author Report Share Posted January 17, 2004 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 Quote Link to comment Share on other sites More sharing options...
liquidzoo Posted January 17, 2004 Report Share Posted January 17, 2004 Ok, is sshd running? If so, is it configured correctly? It seems to me that if it's configured correctly, you wouldn't be getting the connection refused errors. Check webmin for an easy way to configure ssh Quote Link to comment Share on other sites More sharing options...
Guest emetib Posted January 17, 2004 Report Share Posted January 17, 2004 (edited) 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 January 17, 2004 by emetib Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.