Jump to content

Welcome to Beyond Windows 9 - Portal to the Future
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!


Photo

Debian - Send SSH/SFTP log


  • Please log in to reply
4 replies to this topic

#1
Hottwire

Hottwire

    Sr Member

  • BW9 Donator +
  • 280 posts

Does anyone here know or could point me in the right direction:

 

 

I have a Debian Linux box sitting on the OVH network

 

I have SSH setup on port 2298.

 

I disallow all FTP sessions and make everyone who I allow access a user profile with a ppk key file.

 

They then can login to the server to download files from it via SFTP.

 

Now what I want to do is for the server to email me the log of when they login (and from what IP) and a rough idea of what file(s) they've grabbed.

 

Now ideally i want to use my own email account (as i have my own hosting setup, so can easily create a new email address)

 

Is there an easy way of doing this.

 

Or and this a big OR would it be easy to do this with a FTP server. (If i go down this root i need it to be as secure as the way i have setup above, Whereby only certain people with a special file (i give out: ppk generated by me for there account) can login. 

 

 

Cheers for any help


  • Tetley likes this

2nk7u55.png


#2
hacktrix2006

hacktrix2006

    Hero Member

  • BW9 Donator +
  • 658 posts

have a look at this site mate, might help its do able.

 

http://joshua14.home...rg/blog/?p=1764


  • Hottwire likes this

25qr9cy.png


My Current Gaming System

MSI GT72 6QD: Intel i7 6700HQ, 16GB DDR4, 256GB Samsung nVME SM951, 2x 1TB SanDisk X400 M.2, 1TB Hitachi HDD @7200RPM, nVidia GTX970M 6GB, Realtek 898 ALC with Nahimic and Dynaudio Speakers. Windows 10 Home OEM:DM upgrade to Windows 10 Pro (Legit). 230w PSU.


#3
Hottwire

Hottwire

    Sr Member

  • BW9 Donator +
  • 280 posts

That looks perfect cheers for the link I'll follow it up tomorrow as i'm out tonight. 


2nk7u55.png


#4
hacktrix2006

hacktrix2006

    Hero Member

  • BW9 Donator +
  • 658 posts
No problem jus use apt-get install in the yum commands lol

25qr9cy.png


My Current Gaming System

MSI GT72 6QD: Intel i7 6700HQ, 16GB DDR4, 256GB Samsung nVME SM951, 2x 1TB SanDisk X400 M.2, 1TB Hitachi HDD @7200RPM, nVidia GTX970M 6GB, Realtek 898 ALC with Nahimic and Dynaudio Speakers. Windows 10 Home OEM:DM upgrade to Windows 10 Pro (Legit). 230w PSU.


#5
Hottwire

Hottwire

    Sr Member

  • BW9 Donator +
  • 280 posts

Installed mailx & sendmail and now configuring it.

 

will let you know how it goes 

 

 

Got it sending from my server to my gmail box.

 

Needs more configuring but the depressing bit is gmail is marking it down as spam!

 

its coming from user@serverip to my gmail

 

although i'd like it to come from a custom email i setup.

 

More tweaking I think and i'll have it hopefully.


Edited by Hottwire, 19 December 2014 - 02:32 PM.

  • Tetley likes this

2nk7u55.png



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users