LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-04-2004, 12:55 AM   #1
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Rep: Reputation: 0
noob needs help with ssh


I'm very new with linux, I just installed Knoppix (Debian sid) on 2 machines. This is a trainning exercise for me to learn something about linux, so right now security is not a concern on these machines. I have the root passwords, and a user account on each machine. I called one of them "tuxtop" and the other "tamecca" and put ip addresses for them in the /etc hosts file. I can successfully ping from and to them. I also put +tammeca and +tuxtop in the /etc/hosts.allow file. I also blanked out the /etc/hosts.deny file. I also remaned the sectty file. So, from the reading I've been doing I thought I should get a password prompt from typing "ssh dwind@tamecca". I didn't I got an error message:

Code:
root@tuxtop:~# ssh dwind@tamecca
ssh: connect to host tamecca port 22: Connection refused
root@tuxtop:~#
dwind is the user account on tamecca. can anyone please steer me in the right direction on this.
My goal is to get an xterm, or a x windows session going from tuxtop to tamecca.
 
Old 09-04-2004, 01:07 AM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,514

Rep: Reputation: 69
Re: noob needs help with ssh

Quote:
Originally posted by animalflstc
I'm very new with linux, I just installed Knoppix (Debian sid) on 2 machines. This is a trainning exercise for me to learn something about linux, so right now security is not a concern on these machines. I have the root passwords, and a user account on each machine. I called one of them "tuxtop" and the other "tamecca" and put ip addresses for them in the /etc hosts file. I can successfully ping from and to them. I also put +tammeca and +tuxtop in the /etc/hosts.allow file. I also blanked out the /etc/hosts.deny file. I also remaned the sectty file. So, from the reading I've been doing I thought I should get a password prompt from typing "ssh dwind@tamecca". I didn't I got an error message:

Code:
root@tuxtop:~# ssh dwind@tamecca
ssh: connect to host tamecca port 22: Connection refused
root@tuxtop:~#
dwind is the user account on tamecca. can anyone please steer me in the right direction on this.
My goal is to get an xterm, or a x windows session going from tuxtop to tamecca.
Try as root /etc/init.d/ssh start or if you have not already generated the ssh keys for the machines you may want to do apt-get install --reinstall ssh to obviously reinstall the package thus creating the keys and setting up the proper links so that it will be started on boot. Knoppix by default disables these for security reasons. Oh and you should not be root when trying to login into another machine or try to login into root on another machine always do both as normal user then use su to gain root access if needed. Since you want to use an X session from one machine to another you will want to edit the /etc/ssh/sshd_config file and change.

Code:
X11Forwarding no
To

Code:
X11Forwarding yes
Then restart the daemon with /etc/init.d/ssh restart and when you login use ssh -X user@ip_or_host to enable the forwarding for the session.
 
Old 09-04-2004, 01:10 AM   #3
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Is the ssh daemon running by default?
 
Old 09-04-2004, 01:25 AM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,514

Rep: Reputation: 69
Quote:
Originally posted by bruno buys
Is the ssh daemon running by default?
No on a Knoppix install you have to edit the .knofig (IIRC) file and set it to be started before you run install script for the second time, the first being a dry run to create the .knofig so you can edit it.
 
Old 09-04-2004, 02:12 AM   #5
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Original Poster
Rep: Reputation: 0
Unhappy

Thanks for the help. I reinstalled ssh, restarted it, edited the ssh_config file, logged in from a user account to a user account. I tried a host, then I tried an IP address. I still get connection refused.

Last edited by animalflstc; 09-04-2004 at 02:13 AM.
 
Old 09-04-2004, 02:18 AM   #6
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
firewall?

linux_terror
 
Old 09-04-2004, 02:32 AM   #7
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Original Poster
Rep: Reputation: 0
I don't know, how do you check? What's the firewall software in Debian called?
 
Old 09-04-2004, 02:42 AM   #8
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Original Poster
Rep: Reputation: 0
My dsl hub does have a gateway address, But I don't think you use that since both machines are local.
 
Old 09-04-2004, 04:46 AM   #9
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Can you ping one computer from the other? By hostname and by IP?
 
Old 09-04-2004, 10:05 AM   #10
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, I can ping to both computers, after I put both computers in each others hosts file. I can also ping on the internet via dhcp.
 
Old 09-04-2004, 11:14 AM   #11
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Original Poster
Rep: Reputation: 0
Are there any other files I could have messed up that would prevent this from happening?
 
Old 09-04-2004, 11:15 AM   #12
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,514

Rep: Reputation: 69
Quote:
Originally posted by animalflstc
Thanks for the help. I reinstalled ssh, restarted it, edited the ssh_config file, logged in from a user account to a user account. I tried a host, then I tried an IP address. I still get connection refused.
Can we see the output of ssh -vv user@ip_or_host and the contents of the /etc/ssh/sshd_config file on the machine you are logging into.
 
Old 09-04-2004, 12:34 PM   #13
animalflstc
LQ Newbie
 
Registered: Sep 2004
Location: Sacramento, calif.
Distribution: Debian (knoppix)
Posts: 7

Original Poster
Rep: Reputation: 0
Unhappy

I might have discovered a problem... I named both computers and put both computers and made up an ip address for them (192.168.1.150 tuxtop, and 192.168.1.151 tammeca). when I check the active IP table on my router, the ip addresses are switched... do I have a DHCP problem? I have 3 computers connected to each other, and to the internet via dhcp, and my dls modem.
 
Old 09-04-2004, 04:32 PM   #14
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
most likely you do have a dhcp problem....I am NOT a fan of dhcp, at least not for servers...you should probably set static ip's for any servers you have running on your local network.

linux_terror
 
Old 09-04-2004, 04:35 PM   #15
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
Is it possible that you just need port 22 forwarded (and opened up) in your router? I know I had to go into my router config and inside there is a forwarding tab, in which I set port 22 to forard to my linux box. In your case, perhaps you can forward it to both? Not sure on that one, but worth a look.
 
  


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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
SSH connect troubles... NOOB!! Mathijs Linux - Networking 7 03-14-2005 12:44 PM
Firewall help (noob really really huge noob) ProtoformX Linux - Networking 1 03-29-2004 01:19 AM
[ Real NooB Inside ] VNC SSH - How to configure it ?? Slammy Linux - Networking 5 09-26-2003 01:17 PM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 01:03 AM


All times are GMT -5. The time now is 08:16 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration