WinSCP – Import/Export Your Saved Sessions List and Settings from a Computer that is Offline

If you want to backup your saved sessions from WinSCP, that is easy enough, as long as the computer is still in a working state, you can use the backup and restore feature from within the software. But what if the computer doesn’t boot or you swapped the drive into a different machine? So long as you can still access the drive and have access to that user’s registry file, you can easily extract the data you need. Continue reading “WinSCP – Import/Export Your Saved Sessions List and Settings from a Computer that is Offline”

Bash Script – Sync a File to an Array of Hosts

#!/bin/bash
# Sync a file to a remote set of servers using scp and check using diff
# NOTE: This requires the use of 'sshpass' and IS insecure in nature
# It also assumes the user credentials are identical on all hosts
# and that they have the necessary permissions on the remote directory
# Author: Nathan Thomas
LOGFILE='/var/log/sync_files.log'
SSH_USER='non-root-user'
SSH_PASS='password'
CONF_FILE='/etc/appdir/myconfig.conf'
SERVERS=('server1.fqdn.com' 'server2.fqdn.com' 'server3.fqdn.com')
for HOST in "${SERVERS[@]}" ; do
        # NOTE: This won't work if the host keys are not already in the ssh cache
        # Flush ssh hosts - Either uncomment these two lines on first run or you could leave it uncommented for hosts that change addresses a lot
 Continue reading "Bash Script – Sync a File to an Array of Hosts"