Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-30-2011, 10:53 AM
|
#1
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Rep:
|
Need assistance SSHing into Fedora 14 when Fedora had no problem SSHing into Ubuntu
Well, you see, after checking out a tutorial from my favorite BASH tutorial guy, Metalx1000, he showed me how to SSH. Well, any way, I did the SSH thing with my laptop to get into Ubuntu and it worked perfectly... but when I try it from Ubuntu it says there's no route to the port. I'm using the IP that shows up for Nmap when I scan it, but it still doesn't work. Also, I've noticed that in an Nmap scan it won't show that SSH is open but it does for my iPod Touch and Ubuntu 11.04 desktop. Is there a way to open the SSH port so I can SSH in?
|
|
|
05-30-2011, 11:06 AM
|
#2
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Have you installed a SSH server on the Fedora machine?
|
|
|
05-30-2011, 11:40 AM
|
#3
|
Member
Registered: Jan 2010
Posts: 418
Rep:
|
first make sure ssh service is running:
Code:
[root@t61 ~]# /etc/init.d/sshd status
openssh-daemon is stopped
[root@t61 ~]# /etc/init.d/sshd start
Starting sshd: [ OK ]
[root@t61 ~]# /etc/init.d/sshd status
openssh-daemon (pid 29034) is running...
then make sure port 22 is open in your firewall
if you can ssh to localhost (so from fedora to fedora machine), but not from the ubuntu to the fedora machine, then you most probably have a firewall issue.
You can also double check the IP address that the ubuntu machine should use.
Type on your ubuntu machine:
it will tell you the IP of the fedora machine since you used it to connect to ubuntu machine.
Last edited by 16pide; 05-30-2011 at 11:42 AM.
|
|
1 members found this post helpful.
|
05-30-2011, 02:10 PM
|
#4
|
LQ Newbie
Registered: May 2011
Posts: 10
Rep:
|
Quote:
Originally Posted by 16pide
first make sure ssh service is running:
Code:
[root@t61 ~]# /etc/init.d/sshd status
openssh-daemon is stopped
[root@t61 ~]# /etc/init.d/sshd start
Starting sshd: [ OK ]
[root@t61 ~]# /etc/init.d/sshd status
openssh-daemon (pid 29034) is running...
then make sure port 22 is open in your firewall
if you can ssh to localhost (so from fedora to fedora machine), but not from the ubuntu to the fedora machine, then you most probably have a firewall issue.
You can also double check the IP address that the ubuntu machine should use.
Type on your ubuntu machine:
it will tell you the IP of the fedora machine since you used it to connect to ubuntu machine.
|
You can check whether the port22 is open using lsof option.
If you are getting a route not found error ,then i think you need to add a route to your required I.P .This can be done using routeadd command.
If you are getting error related to key follow the below step:
I accept with above said solution.
If still did not work out check the host key option in /etc/ssh/sshd_config in the server machine.
There may be chances that the stricthostkey checking may have been set to yes,in which case it will not allow to ssh without the proper host key
You may also refer to this link for better understanding:
<link removed>
Last edited by michaelk; 06-05-2011 at 04:58 AM.
|
|
1 members found this post helpful.
|
05-30-2011, 03:45 PM
|
#5
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by 16pide
first make sure ssh service is running:
Code:
[root@t61 ~]# /etc/init.d/sshd status
openssh-daemon is stopped
[root@t61 ~]# /etc/init.d/sshd start
Starting sshd: [ OK ]
[root@t61 ~]# /etc/init.d/sshd status
openssh-daemon (pid 29034) is running...
then make sure port 22 is open in your firewall
if you can ssh to localhost (so from fedora to fedora machine), but not from the ubuntu to the fedora machine, then you most probably have a firewall issue.
You can also double check the IP address that the ubuntu machine should use.
Type on your ubuntu machine:
it will tell you the IP of the fedora machine since you used it to connect to ubuntu machine.
|
Code:
[theif519@theif519 ~]$ /etc/init.d/sshd status
openssh-daemon is stopped
[theif519@theif519 ~]$ /etc/init.d/sshd start
Generating SSH2 RSA host key: [FAILED]
[theif519@theif519 ~]$ /etc/init.d/sshd start
Generating SSH2 RSA host key: [FAILED]
[theif519@theif519 ~]$ /etc/init.d/sshd status
openssh-daemon is stopped
[theif519@theif519 ~]$ /etc/init.d/sshd status
openssh-daemon is stopped
[theif519@theif519 ~]$ /etc/init.d/sshd start
Generating SSH2 RSA host key: [FAILED]
[theif519@theif519 ~]$
What do I do when this happens?
|
|
|
05-30-2011, 03:51 PM
|
#6
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by karthik3152
You can check whether the port22 is open using lsof option.
If you are getting a route not found error ,then i think you need to add a route to your required I.P .This can be done using routeadd command.
If you are getting error related to key follow the below step:
I accept with above said solution.
If still did not work out check the host key option in /etc/ssh/sshd_config in the server machine.
There may be chances that the stricthostkey checking may have been set to yes,in which case it will not allow to ssh without the proper host key
You may also refer to this link for better understanding:
http://linux-forum-karthik.blogspot....ng-in-ssh.html
|
You said "...follow the below step:" and then you said "I accept with above said solution" What do you mean?
I've set it to "yes" and when I get home I'll try it, but I hope I didn't mess anything up. Perhaps I should make backups of the files before editing them as root. *Note to self*
|
|
|
05-30-2011, 03:53 PM
|
#7
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Original Poster
Rep:
|
Mission Accomplished! Thanks guys, the 2 answers telling me to start and to edit the sshd_config files were the huge helpers, and also thank anyone else who has contributed and added to the advise as well.
|
|
|
05-30-2011, 06:06 PM
|
#8
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Original Poster
Rep:
|
Actually, mission incomplete... I still can't SSH into it. The OpenSSH Daemon is running but it's not letting me find the route to it. I've done everything you guys said and it won't work. Does this mean that Fedora is more secure than Ubuntu by default? Ubuntu's SSH was always open but Fedora's seems closed/filtered
|
|
|
05-31-2011, 12:44 AM
|
#9
|
Member
Registered: Jan 2010
Posts: 418
Rep:
|
so, I understand you now have the ssh service running, but you can't ssh into it.
Can you try ssh command from fedora to fedora machine (over localhost).
also, try to ping from ubuntu machine to fedora machine.
if both of this works, then you'll know the only thing to fix is to open port 22 in your firewall
|
|
|
05-31-2011, 08:48 AM
|
#10
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Original Poster
Rep:
|
I fixed it, some guide said to do what you said and if I could then do
And it worked. Fedora has given me a lot of material to work with and learn from, I like it.
|
|
|
06-04-2011, 08:05 AM
|
#11
|
Member
Registered: Jan 2010
Posts: 418
Rep:
|
great news!
Can someone confirm that theif519 has not fully disabled the firewall with that iptables command (which is dangerous)
|
|
|
06-04-2011, 12:11 PM
|
#12
|
LQ Newbie
Registered: Dec 2010
Posts: 16
Rep:
|
Quote:
Originally Posted by 16pide
great news!
Can someone confirm that theif519 has not fully disabled the firewall with that iptables command (which is dangerous)
|
Code:
man iptables
...
-F, --flush [chain]
Flush the selected chain (all the chains in the table if none is
given). This is equivalent to deleting all the rules one by one.
So yes the firewall is disabled. At least until he restarts it or reboots.
|
|
|
06-04-2011, 02:34 PM
|
#13
|
Member
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by confconf
Code:
man iptables
...
-F, --flush [chain]
Flush the selected chain (all the chains in the table if none is
given). This is equivalent to deleting all the rules one by one.
So yes the firewall is disabled. At least until he restarts it or reboots.
|
I always copy a backup of files before I configure them. This was no different. I followed the guide and it worked. I have a backup for iptables so I can copy and paste at will.
|
|
|
All times are GMT -5. The time now is 07:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|