LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-23-2008, 06:39 PM   #1
Kratosaurion7
LQ Newbie
 
Registered: Dec 2008
Distribution: Fedora/Ubuntu
Posts: 18

Rep: Reputation: 0
Question Secure Shell Server - How to? (Fedora 10 )


Ok, I got interested in SSH a couple of days ago, but I must admit I'm a pretty newbie in all that server stuff and networking. Its all magic to me, I was wondering if there was good guides on how to set one up. Currently the only thing I know about it is how to star it:
" service sshd start "

Also, im running Linux(Fedora 10, BTW) on a virtual machine and I was wondering: when my server is up, how the hell does people connect to it? The way my VM is set up is to share the Parent's IP, won't it cause a problem? Anyway, thanks to anyone who can find answers to my questions.

(Edit: Im ready to set it up in Ubuntu if need be)

Last edited by Kratosaurion7; 12-23-2008 at 08:45 PM. Reason: Added an edit
 
Old 12-23-2008, 08:47 PM   #2
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,143

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
to connect to an ssh server:
Code:
ssh <user>@<ip-address>
pretty straight forward. when you tested it yourself, did it cause a conflict with the host-os's address ?

Last edited by schneidz; 12-23-2008 at 08:48 PM.
 
Old 12-24-2008, 12:13 AM   #3
Kratosaurion7
LQ Newbie
 
Registered: Dec 2008
Distribution: Fedora/Ubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Well, I had mixed results but for some problem I never could test it fully. My problem relies in the logic of the thing. Heres an example: Here is computer1, computer1 has a virtual machine(linux) that is hosting the server. Both physical and virtual machine shares the same IP address (for some reason I never quite figuered how to get him his own IP). And then I have computer2 who enters the IP of the host to connect to the SSH. But lets say he enters the IP 123.456.789.000 , will that get him to the physical machine or the virtual one?
 
Old 12-24-2008, 02:08 AM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
You might want to do some reading. The www.tldp.org website has a number of howto's and books. The NAG Guide is very good. You won't have an IP address with octets over 255. If the netmask is 255.255.255.0, then when the last octet is 0, that is the network address.

Look at the manpage for ifconfig or ip. You can configure a virtual NIC device that has a name like eth0:1. This uses the same NIC as eth0 but has a different IP address.

Is there a reason you need to run a virtual machine?

Also read through the ssh, ssh_config and sshd_config manpages. You want to A) generate a key pair on the client B) Use "AllowUsers" if you have a limited number of users who will login. C) Use public key authentication. D) copy your client's public key to the ssh servers authorized_keys file.

If you don't use automated ssh connections in a cron job: D) protect your client's private key with a passphrase. E) Disable root logins.

Look at the commented paragraph above the "UsePam Yes" line for detailed instructions on the config files options to change for public key authentication.
 
Old 12-24-2008, 02:23 AM   #5
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,143

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by Kratosaurion7 View Post
... will that get him to the physical machine or the virtual one?
i dunno'. try it and post back the results. if it works then you are done. if it doesnt work, post the error message and hopefully someone could help you.
 
Old 12-24-2008, 10:27 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
You didn't provide many details on what is being used for virtualization. Xen, VMware, QEMU, Parallels, VirtualBox, UML, etal. are some examples. You could be using bridged networking, NAT networking, or Routed networking.

If your virtual machine truly uses the same IP address, you are probably using NAT networking. In that case, the host is configured to forward packets between the guest OSes and may even be configured as a DHCP server for the guests. Just like a NAT Cable router, the host will need to be configured to forward port 22 to your guest VM before you can accept connections from another computer. If your parents machine runs its own ssh service, then you will need to use a different port for ssh and have that port forwarded to your VM.

Another method is bridging. The Host and VMs are connected to a virtual network. One virtual network per physical NIC device. The host acts like a switch.

A third method is routed networking. The host machine is a router to the virtual machines.
 
  


Reply

Tags
fedora, server, ssh


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
a good, easy, secure, FTP server program for Fedora 7 hewittrj Linux - Server 4 05-12-2008 10:39 AM
Secure Shell Server Configuration Help Peter_APIIT Linux - Server 7 08-07-2007 09:03 AM
how can I secure my nis server ?can I use openSSL to secure it form sniffing ? abhi_raj Linux - Networking 1 07-10-2006 07:19 AM
remoste shell and secure shell suchi_s Programming 2 12-21-2004 07:31 AM
secure shell zepplin611 Linux - Software 5 03-03-2004 10:46 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration