Solved

Can't connect through SSH

Posted on 2003-11-10
10
1,239 Views
Last Modified: 2012-05-04
I am new to Linux.  I just installed redhat 7.2 server, but I can't connected to this server through ssh.  I have checked openssh-2.9p2-7 has been installed on the server, and sshd is running.  What should I do to make it work?  Thanks!
0
Comment
Question by:Vincenthkl
10 Comments
 

Accepted Solution

by:
slaxs earned 64 total points
ID: 9717961
Hi Vincenthkl,

To connect to an OpenSSH server from a client machine, you must have the openssh-clients and openssh packages installed on the client machine.

Im guessing you installed the openssh-server package?


Slaxs



0
 

Expert Comment

by:slaxs
ID: 9717976
You must install OpenSSH server (openssh-server) the client (openssh-clients) packages, as well as the general OpenSSH package (openssh) for either of them to work. Hope this helps.
0
 
LVL 1

Assisted Solution

by:robsmart
robsmart earned 62 total points
ID: 9718742
might be that your firewall is blocking port 22 ?? check your firewall settings.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 2

Expert Comment

by:joele23
ID: 9718990
If you are just having problems connecting from a remote machine try using ssh2.
Ive notice a lot of times if I cant ssh in and I try ssh2 it works fine.
0
 
LVL 4

Assisted Solution

by:ferg-o
ferg-o earned 62 total points
ID: 9719937
What user account are you using to connect? If you want to use root it is turned off by default in /etc/ssh/sshd_config - you will need to change the line:

PermitRootLogin no
to
PermitRootLogin yes

Some people don't like to allow root to login remotely due to brute force considerations so another way around it is to create another user using the useradd command and then connect via SSH with that and su to get root access...

Also you can limit access to ssh using /etc/hosts.allow and /etc/hosts.deny - I suggest reading up on those files if you are new to unix.

Good luck!
0
 
LVL 2

Assisted Solution

by:jlindq
jlindq earned 62 total points
ID: 9721389
To trouble-shoot try "telnet [host IP] 22" to connect to port 22 using telnet. If the SSH service is running and not filtered anywhere along the netowrk path you should get a SSH banner (e.g. "SSH-1.99-OpenSSH_3.7.1p2"). (Pressing Return will generate a protocol error and take you back to the prompt.)
If this works, the daemon is up and running and you can contact it. You then need a SSH client (OpenSSH or any other SSH client should do.)

If it doesn't work, I'd suggest trying it locally on the machine, both "telnet localhost 22" and "telnet [Host IP] 22" to see if you can connect locally. If you can't, there is some network filtering (firewalling) in place between the client and server.

You can also start sshd with the -d debug flag. It will then not spawn into daemon mode but run one single process withotu forks anbd output debug messages on the server that you can watch.

0
 
LVL 4

Expert Comment

by:ferg-o
ID: 12820200
Another one bites the dust.

People who post questions, receive answers or request for more info to help the answer, and do not close them out should be penalised methinks?
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CPU at 100% usage, why? 27 149
Review of a VPN cert policy 4 43
Windows Security Pop-Up 7 49
Window update errors on VMs 9 20
As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
Most MSPs worth their salt are already offering cybersecurity to their customers. But cybersecurity as a service is wide encompassing and can mean many things.  So where are MSPs falling in this spectrum?
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question