Click to See Complete Forum and Search --> : configuring SSH


MetalStorm
09-23-2002, 10:07 AM
hi, i was wanting to use SSH to access my linux box from my win2k machine on the network.

i need to know how to get ssh configured properly to let me connect, i'm ueing SecureCRT on the win2k machine but i can't get connected the 'messages' log says Connection refused

needing some top newbie help here guys :)


thanks in advance ;)

z0mbix
09-23-2002, 10:49 AM
Is sshd running on the server? ps ax | grep sshd

You may need to amend some settings in your /etc/ssh/sshd_config file but most distro's set ssh/sshd up so that it works right out the box. Just start it with /etc/rc.d/init.d/sshd start or /etc/init.d/sshd start depending on your distro :)

MetalStorm
09-23-2002, 11:13 AM
okay, sshd was already started so i tried on the same machine to use ssh and it came up with ssh 101.0.0.4
it says:
ssh_exchange_identification: Connection closed by remote host
so i tried ssh 127.0.0.1
and it came up with:
Secure connection to 127.0.0.1 refused

and from the win2k machine i tried with putty and SecureCRT, no luck.

also when i edited sshd_config i added ListenAddress 101.0.0.4 because it was set to 0.0.0.0

thanks for the reply! :D

hopefuly that information will help now

MetalStorm
09-24-2002, 03:40 AM
right...
would it help if i posted the contents of my sshd_config file?
anything else that would be helpful?

please give me a hand here guys :|

z0mbix
09-24-2002, 03:46 AM
What distro are you running? RedHat? How did you configure the firewall when you installed it? Is port 22 accessible?

MetalStorm
09-24-2002, 07:33 AM
i'm runing Mandrake 7.2, and i installed as a 'Server'. there wasn't any configuration for the fire wall in the install (it's just newly installed so i haven't played much yet) just did a port scan and 22 isn't open!!! right i'll try and get that working then ;)
thanks for the reply! :)
i'll let you know what's happening

z0mbix
09-24-2002, 07:53 AM
ah, what version of ssh is running on MD7.2? It maybe quite old now, and there will probably have been many security updates since then. It may be worth upgrading ssh anyway, if you want to be more secure. Post your sshd_config anyway, but I'd upgrade ssh especially if you're going to use it over the internet.

MetalStorm
09-24-2002, 08:48 AM
right sshd is runing, the port is open now it's OpenSSH_2.2.0p1
also what do i need to have runing and is there anything else i should configure?

here comes the config (only thing i've edited is the ListenAddress because it was set to 0.0.0.0 before :))

# This is ssh server systemwide configuration file.

port 22
#Protocol 2,1
ListenAddress 101.0.0.4
#ListenAddress ::
HostKey /ect/ssh/shh_host_key
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
PermitRootLogin yes
#
# Don't read ~/.rhosts and ~/shosts files
IgnoreRhosts yes
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd yes
KeepAlive yes

# Logging
SetlogFacility AUTH
LogLevel INFO
#obsoletes QuiteMode and FascistLogging

RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
#
RSAAuthentication yes

# To disable tunneled clear text password, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to disable s/key passwords
#SkeyAuthentication no

# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

CheckMail no
#UseLogin no

#Subsystem sftp /usr/local/sbin/sftpd
#MaxStartups 10:30:60


right well i typed that out :)

--also just another quick question, how do you extract .bz2 files, i've got the hang of .tar.gz but i don't know what to do after i've used bzip2 -d whatever.bz2

right, looking forward to your reply :)

MetalStorm
09-24-2002, 11:51 AM
...okay i just commented out the line in /etc/hosts.deny and it seems to work, anything else i should do?