Listing files and folders well-arranged

Backlinkseller

Many people know the problem: You have to find something, but you’re having no idea where to find it. Of course, you can use “locate” or “find” and search for the file. But what’s the best possibility for getting an overview about directories, files, binaries or subdirectories?
YES – it’s using the “tree” command. But what are you going to do, if you’re working on a managed server without any root-access and without the possibility to install tree? 
Here’s a short solution for this problem:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^/]*//--/g' -e 's/^/   /' -e 's/-/|/'

The post Listing files and folders well-arranged appeared first on Techwrk.

Zum Blog blog-busters

Mount a temporary ram partition


With this simple snippet you can mount a temporary ram partition: ( Be careful – please check if you’re having enough ramspace free )

mount -t tmpfs tmpfs /mnt -o size=128m

It’s also possible to write a similar command into /etc/fstab, so that the ram partition will be automatically mounted after a reboot.

The post Mount a temporary ram partition appeared first on Techwrk.

Zum Blog blog-busters

rkhunter


I want to introduce rkhunter – a very useful tool for protecting your server (Debian/Ubuntu).

apt-get install rkhunter

 

After that,  you should open the configfile with your preferred editor:

vi /etc/rkhunter.conf

 

Please change the emailadress to your emailadress:

MAIL-ON-WARNING="user@domain.tld"

Now you can do the first run:

rkhunter --check

 

For more informations about rkhunter please see:

rkhunter readme

The post rkhunter appeared first on Techwrk.

Zum Blog blog-busters

How to secure a Debian Server

Backlinkseller

I just want to show you some tools/methods for securing your Debian/Ubuntu-server.

Secure your SSH-login (please open /etc/ssh/sshd_config):

- forbid root-login

PermitRootLogin no

- only allow SSH-login with SSH-key (no password login)

PasswordAuthentication no

- change your SSH-port (for example Port 2020 instead of 22)

Port 2020

- if you have more than one IP-Adress which is accessible from everywhere, you should make your SSH-Daemon listen to only one IP-Adress

ListenAddress 1.2.3.4

(replace 1.2.3.4 with the IP-Adress you want your SSH-Daemon to listen to)

Install Updates regularly:

apt-get update && apt-get upgrade

Use fail2ban for prohibiting bruteforce-attacks:

- Simply install that tool via aptitude

Find rootkits with rkhunter: (rkhunter)

- You can install rkhunter via aptitude

If you did all these changes applying the SSH-settings and you installed fail2ban and rhunter you can say that your server is quite secure. Of course, this is no guarantee that your server won’t be hacked, but it makes it much harder.

Instacode

Vor Kurzem habe ich ein geniales Tool gefunden, welches Code visualisieren kann. Das bedeutet, dass man auf www.instacod.es einen Codeschnipsel eingeben kann, welcher dann als schickes Bildchen dargestellt wird.

instacod.es

Zum Blog blog-busters