Posts tagged ssh

Visualised: 24 hours of SSH attacks against a single server

17

24 hours of SSH attacks against a single server, visualised on a world map using Python.

When a country stays lit up for more than 1 tick of the clock in the left hand corner it means that multiple attacks are happening from different IP addresses. An attacker is banned after;

  • 1 failed root login,
  • 3 failed user logins (including invalid users) and
  • 3 failed system logins.

(more...)

Am I Secure?

0

This program is still in Alpha phase and is nowhere near complete. It's purpose is quite simply to be run on a server and let you know if there are any possible security holes in your configuration. It is designed and configured around Debian so will not work properly on Red Hat-based distributions without modifications to the tests.

What can it scan?
  • OpenSSH
  • nginx
  • Apache2
  • PHP5
  • DenyHosts
How does it work? Am I secure will open up your configuration files in the order that each program would include them in, for example Apache2 includes them in the following order on Debian-based More >

SSH Tunnelling

0

Quite a simple one:

ssh -f USER@INTERMEDIATE_DEVICE -L LOCAL_PORT:DESTINATION_DEVICE:DESTINATION_PORT -N

-f tells ssh to go to background

-L binds a local port to a remote device and port

-N tells ssh not to execute any commands

So use this to tunnel from local port 8000 in to a remote machine on port 22 you'd use

ssh -f user@server.test.com -L 8000:server.destination.com:22 -N

Once the tunnel is open you can use the following to ssh or scp data around

ssh localhost -p 8000

scp -P 8000 /path/to/local/file user@localhost:~

scp -P 8000 user@localhost:/path/to/remote/file .

I use ssh tunnels all More >

Mounting a remote filesystem using sshfs

0

First we need to install sshfs.

sudo apt-get install sshfs fuse-utils

Now we make a mount point, I'm going to use a directory in my home directory for this.

mkdir ~/remote-content

And now we simply mount our remote directory to it.

sshfs user@host:/path/to/location ~/remote-content

It's as simple as that.

HOWTO: SSH config on Debian/Ubuntu

1

Today I finally got round to setting up my local user ssh config on my new work laptop and figured I'd do a quick write up on it and it's uses.

You can create a configuration file in your home directory that will override the options set in your machine-wide config.

Your configuration files

Your local config can be found/created in:

~/.ssh/config

And your machine-wide configuration is in:

/etc/ssh/ssh_config

Rather than editing my ssh config across my whole machine I'm doing it for my local user specifically.

Reading the man page for ssh_config will give you a full list of available options, More >

Go to Top