LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-30-2011, 10:53 AM   #1
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Rep: Reputation: 4
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?
 
Old 05-30-2011, 11:06 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871Reputation: 4871
Have you installed a SSH server on the Fedora machine?
 
Old 05-30-2011, 11:40 AM   #3
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
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:
Code:
last|head
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.
Old 05-30-2011, 02:10 PM   #4
karthik3152
LQ Newbie
 
Registered: May 2011
Posts: 10
Blog Entries: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by 16pide View Post
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:
Code:
last|head
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.
Old 05-30-2011, 03:45 PM   #5
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by 16pide View Post
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:
Code:
last|head
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?
 
Old 05-30-2011, 03:51 PM   #6
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by karthik3152 View Post
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*
 
Old 05-30-2011, 03:53 PM   #7
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Original Poster
Rep: Reputation: 4
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.
 
Old 05-30-2011, 06:06 PM   #8
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Original Poster
Rep: Reputation: 4
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
 
Old 05-31-2011, 12:44 AM   #9
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
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
 
Old 05-31-2011, 08:48 AM   #10
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Original Poster
Rep: Reputation: 4
I fixed it, some guide said to do what you said and if I could then do
Code:
 iptables -F
And it worked. Fedora has given me a lot of material to work with and learn from, I like it.
 
Old 06-04-2011, 08:05 AM   #11
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
great news!
Can someone confirm that theif519 has not fully disabled the firewall with that iptables command (which is dangerous)
 
Old 06-04-2011, 12:11 PM   #12
confconf
LQ Newbie
 
Registered: Dec 2010
Posts: 16

Rep: Reputation: 0
Quote:
Originally Posted by 16pide View Post
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.
 
Old 06-04-2011, 02:34 PM   #13
theif519
Member
 
Registered: Mar 2011
Location: Rochester, NY
Distribution: N/A
Posts: 255

Original Poster
Rep: Reputation: 4
Quote:
Originally Posted by confconf View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSHing to a box behind a NAT. (almost there) unraisedarc Linux - Newbie 2 07-06-2010 07:25 PM
SSHing to server behind NAT? genmaicha Linux - Networking 7 04-17-2009 12:50 AM
Slowness when SSHing and SCPing? Rotwang Linux - General 6 03-17-2008 10:14 AM
sshing questions bluknight43 Linux - Newbie 1 02-12-2005 09:06 PM
Problems sshing into box Ripshred Linux - Networking 2 11-08-2003 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration