LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-17-2010, 09:16 PM   #1
Ringmaster
Member
 
Registered: Apr 2009
Posts: 38

Rep: Reputation: 16
Linux Computer into an SSH server


Well i was hoping to be able to log on to my computer remotely using putty. I'm using Xubuntu

But i've never done it before so i'm a little nervous.

As far as i can tell i'll need to do port forwarding to make sure that my computer can be found through the wifi.

There's a few computers using the local network so i'm a little worried about security. I have no clue what i'm doing at this point it looks like something called OpenSSH needs to be installed.

But how do i keep people from logging on as root? and how can i make sure they don't try a bruteforce attack?

Is there a good tutorial out there somewhere? I hear there's programs that can stop people from attempting to log on more then a few times every few minutes.

Anyway, i found a bunch of wikipedia articles and some blog things where people rant and rave about it, but i haven't found any tutorials that a dummy like me can follow :P So any help would be appreciated.
 
Old 04-17-2010, 09:32 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Yes, there are a ton of tutorials.

You just need to install openssh-server (assuming you're on Ubuntu as your profile says). You can disallow remote root login in the config file, /etc/ssh/sshd_config. If you want to access your server from outside of your LAN, then yes you'll need to forward a port. You can mitigate bruteforce attacks with tools such as DenyHosts or Fail2Ban.
 
Old 04-17-2010, 09:46 PM   #3
Ringmaster
Member
 
Registered: Apr 2009
Posts: 38

Original Poster
Rep: Reputation: 16
ok if i open up port 22 for port forwarding which i think i'm supposed to do.. umm.. do i have to worry about any other computer on the network of being at risk?
 
Old 04-17-2010, 09:52 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Only if the bots get into your SSH server. Use strong passwords, etc - there are tons of tutorials on securing SSH.
 
Old 04-18-2010, 03:09 AM   #5
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: Mepis; Maemo; openSUSE
Posts: 384
Blog Entries: 74

Rep: Reputation: 81
Once you get the basics set up and running, here's something to go through to improve your security.
 
Old 04-18-2010, 03:20 AM   #6
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
A small description about ssh for you:

In ubuntu/Xubuntu,

1.to make your system an ssh-server:

#apt-get install openssh-server

2. By default, each ubuntu system will be installed with openssh-client. So, u need not do anything in the client side. The ssh environment is ready now.

3. Now, from client system,
ssh <ValidUserNameofSSHServer>@<SshserverIP/hostname>

eg. ssh root@sshserver
eg2. ssh sam@sshserver
Issue the appropriate password, and you are in the ssh server now.

4. Other useful details about ssh:
You can see a directory named .ssh in each user's home directory (provided there was a successful ssh login before). You may find out the use of known_hosts file you see inside the .ssh directory from the internet.
You can restrict root user access to your ssh server by editing the following file in your

ssh server: /etc/ssh/sshd_config

In this file, change the following directive from yes to No.

PermitRootLogin No

Thanks...

Last edited by saagar; 04-18-2010 at 12:12 PM.
 
Old 04-19-2010, 08:30 AM   #7
Ringmaster
Member
 
Registered: Apr 2009
Posts: 38

Original Poster
Rep: Reputation: 16
You guys are awesome! Thanks alot!
 
  


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
can't login network server through ssh after putting main computer to sleep truthe Linux - Networking 5 07-26-2009 02:41 AM
VNC Over SSH | Linux laptop -> Linux SSH Server -> Windows VNC Server jakestaby Linux - Networking 3 01-28-2009 03:33 PM
ssh -x on a mac osx to a Linux computer 1veedo Linux - General 6 09-19-2007 06:22 PM
kerberized ssh window client can't authenticate to kerberized Linux SSH server celeron Linux - Software 0 04-11-2007 06:36 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM


All times are GMT -5. The time now is 10:07 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