Solved

Can't connect through SSH

Posted on 2003-11-10
10
1,235 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Ransomware continues to be a growing problem for both personal and business users alike and Antivirus companies are still struggling to find a reliable way to protect you from this dangerous threat.
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now