27 Search results

For the term "ssh".

Systemd ssh Reverse Tunnel on Debian 9 Stretch

I have used rc.local for years to setup an ssh reverse tunnel on boot under Debian up until Stretch. Now like many others I imagine, I’ve had to convert to systemd. I read everything I could about the choice for deprecating rc.local for systemd. I can say that systemd may be powerful, but systemd’s complexity entails a huge learning-curve for...

SSH Reverse Tunnel Not Working Mystery

When using autossh to create a reverse tunnel, sometimes, mysteriously (for the moment), on the remote server, the connect is refused, returning this message in syslog/messages autossh[7451]: 127.0.0.1:{port}: Connection refused The problem is autossh process is running (pid 7451) but frozen ( thats the mystery ) The solution: sudo kill $(ps aux | grep ‘autossh’ | awk ‘{print $2}’)

Setup SSH for Accessing Remote Server Without Password

On the Remote Server Logged in As User or as root but in users home sudo mkdir ~/.ssh sudo chmod 700 ~/.ssh && chmod 600 ~/.ssh/* On you local (desktop) assuming you have already created your GPG Keys cat ~/.ssh/id_rsa.pub | ssh root@example.com 'cat – >> ~/.ssh/authorized_keys'

Tunnel MySQL Over SSH

Assuming On a “remote.com” server that we will connect to from our LocalMachine 1) MySQL database named “database” 2) MySQL database is running on remote server “remote.com” 3) MySQL is running and listening on (standard) localhost:port “127.0.0.1:3306” 4) MySQL username “mysql_user_name” 5) MySQL password “mysql_password” 6) SSH must be listening on port 9999 7) SSH AllowUsers “ssh_user_name” 8) SSH password...

Start Reverse Tunnel on boot using autossh for Debian 7

As usual, most of the how-to guides out there are too brief (I’m guilty) or apply to other distros: This works on Linux Debian 7 all-around, and this is a complete how to. It works. You just have to follow a very long thread. No A.D.D. here! We will create a Persistent Reverse SSH Tunnel between 2 machines using autossh....

How to Change or Disable SSH Timeout

On Client sudo vi /etc/ssh/ssh_config add line ServerAliveInterval 100 On Server sudo vi /etc/ssh/sshd_config add lines ClientAliveInterval 30 TCPKeepAlive yes ClientAliveCountMax 99999 From command line per session ssh -o ConnectTimeout=10 ssh -o ConnectTimeout -o BatchMode=yes -o StrictHostKeyChecking=no ServerAliveInterval operates on the ssh layer. It will actually send data through ssh, so the TCP packet has encrypted data in and a...

Joomla Install Extensions Manually Using Rsync/SSH

I’m very surprised how few solutions (How To Guides) there are out there for this issue. If you don’t use FTP to upload to your server (for security reasons), here’s how to install extension in Joomla using SSH(Rsync). That tells me the Joomla community is largely OK with FTP and getting hacked because of it. (there are certainly no shortage...

Drupal Install Modules and Themes using SSH

If you don’t want to install Drush and don’t want to use FTP (I like a secure server) Install Drupal modules via SSH on Ubuntu Server (12.04 LTS) Assumptions: You have/are… Unix command line proficient Rsync capable Apache2/Ubuntu directories (other flavors of Linux may vary) Download module or theme to desktop Unzip file to an empty directory Upload module or...

How To Manage Fail2ban Using Perl Script On Remote Servers and A Control Mysql Database

Earlier I posted how to use a text file created by a script to similarly manage the rogue IPs that Fail2ban bans. The problem with using scripts and crontab is that it is not reporting in real-time. The method here works in real-time because Fail2ban reports directly to the MySQL on the control server. On each remote you’ll want to...