Connect with WinSCP and Putty via Jump-In SSH host

Goal

A SCP Connection needs to be established, but a connection to a host with WinSCP is not possible, because no direct access is available. But a jump in SSH server is reachable from your PC and the jump in SSH server has access to the desired server.

Intro

There is a firewall or another restriction between your local PC and the machine you want to scp to. No direct connection can be established. For example you’re on the road and the file server’s SSH port  in your home or office is not accessible from the internet. But another machine at your site, which can access the file server is running SSH accessible from the internet.
Continue reading

Send email on SSH login using PAM

Goal

When a user logs in using SSH an email should be sent.

Intro

There are different ways to send an email when someone logs into a machine using SSH. One way could be to parse the auth log file periodically, but this is error prone and rather complex. An easier way is to call a script, that is hooked into PAM, the central authentication service on Linux systems.
Continue reading