Skip to content

Instantly share code, notes, and snippets.

@jmenbo
jmenbo / chrooted_sftp_access.md
Last active March 16, 2016 03:46
Setup chrooted sftp access on Linux systems

Setup chrooted sftp access on Linux systems

Background

This setup allows users to upload files to a specific pre-assigned directory on a Linux server It has a few use-cases, but the context of these instructions is as a Web server where each account uploads files to a different web site on the server Access is given to the root of the web site structure from where a user full access to all folders and files below but is unable to navigate up

Prerequisites

Make sure you are running OpenSSH version greater than 4.8. CentOS/RHEL 6.x and up comes with version 5.3p1

@jmenbo
jmenbo / linux_ad_auth_via_centrify.md
Last active January 19, 2021 05:11
AD Authentication for Linux Systems using Centrify

AD Authentication for Linux Systems via Centrify

Background

From time to time it is useful to be able to have Linux systems authenticate off a Windows AD domain controller

Centrify is a third party product that makes this process easy to setup

Centrify provides two versions of their products, the commercial and the free version

For our purposes, the free version provides all the functionality we need

@jmenbo
jmenbo / remmina_rdp_ubuntu_fix.md
Last active February 27, 2016 21:55
Fix Remmina RDP connection on Ubuntu

Fix Remmina RDP connection on Ubuntu

RDP client Remmina stopped connecting to remote clients from one day to the next. One possible change on the remote client was more strict incoming connection settings set with group policy on the domain they are part of. The fix to this problem was to:

  • Delete the line with the remote client info from the file:
~.freerdp
  • Change the connection settings to:
Edit session settings --> Advanced --> Security = NLA
@jmenbo
jmenbo / upgrade_openssh_on_os_10.9.x.md
Last active May 9, 2024 19:55
Manually upgrade OpenSSH on OS 10.9.x

Manually upgrade OpenSSH on OS 10.9.x

NOTE: Installation and testing was done on a clean Mavericks (OS 10.9) installation

Install Brew:

Install Homebrew prereqs:

xcode-select --install

Install Homebrew

@jmenbo
jmenbo / disable_linux_accounts.md
Last active February 27, 2016 21:55
Disable Linux User Accounts

Disable Linux User Accounts

A common way to lock Linux user accounts is to use the passwd command:

This locks the account:

passwd -l username

This UN-locks the account:

passwd -u username

@jmenbo
jmenbo / ntpq_cant_list_peers.md
Last active February 27, 2016 21:57
Fix ntp client can't list peers | ntpq -p

Fix ntp client can't list peers | ntpq -p

As part of setting up an ntp client it is a good idea to confirm what peers the system is synchronizing time with. To list peers you use the following command:

ntpq -pn 

remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*10.1.1.1    108.61.73.243    2 u  911 1024  377    2.021   -1.184   1.537
@jmenbo
jmenbo / disable_ipv6_centos_6.6.md
Last active February 27, 2016 21:58
Disable IPv6 in CentOS 6.x

Disable IPv6 in CentOS 6.x

1) Add the file:

/etc/modprobe.d/ipv6.conf

With the following contents:

# Disabling ipv6
options ipv6 disable=1