LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Computer into an SSH server (https://www.linuxquestions.org/questions/linux-newbie-8/linux-computer-into-an-ssh-server-802620/)

Ringmaster 04-17-2010 08:16 PM

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.

AlucardZero 04-17-2010 08:32 PM

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.

Ringmaster 04-17-2010 08:46 PM

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?

AlucardZero 04-17-2010 08:52 PM

Only if the bots get into your SSH server. Use strong passwords, etc - there are tons of tutorials on securing SSH.

rich_c 04-18-2010 02:09 AM

Once you get the basics set up and running, here's something to go through to improve your security.

saagar 04-18-2010 02:20 AM

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...

Ringmaster 04-19-2010 07:30 AM

You guys are awesome! Thanks alot!


All times are GMT -5. The time now is 02:21 AM.