Run the following: lftp -c "open -u {USERNAME}, {PASSWORD} {HOSTNAME}; put -O {DIRECTORY-TO-DATA-TO-REMOTELY} {FILE-TO-MOVE}" For example: lftp -c "open -u john.doe, password ftp.google.com; put -O /remote-backups/ /local-backups/file_2_upload.zip"
Run the following: lftp -c "open -u {USERNAME}, {PASSWORD} {HOSTNAME}; put -O {DIRECTORY-TO-DATA-TO-REMOTELY} {FILE-TO-MOVE}" For example: lftp -c "open -u john.doe, password ftp.google.com; put -O /remote-backups/ /local-backups/file_2_upload.zip"
Remove any old versions of docker: yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine Install dependencies: yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 Add docker repository for yum install: yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo Install docker via yum: yum install docker-ce You can also […]
1) Create a new user to access the machine besides root and give them sudo: useradd -m -c "John Doe" john.doe usermod -aG wheel john.doe mkdir /home/john.doe/.ssh chown john.doe:john.doe /home/ben.padgett/.ssh chmod 700 /home/john.doe/.ssh passwd john.doe 2) Locally create a key to access the newly created users account: ssh-keygen -t ecdsa -b 521 ssh-copy-id -i id_ecdsa.pub john.doe@IP_ADDRESS -p PORT […]
Ensure that curl is installed: yum install curl -y Pull the binary from docker: sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose Make the binary executable: sudo chmod +x /usr/local/bin/docker-compose Test the binary by pulling through the compose version: docker-compose --version You should see something like the following: [root@test ~]# docker-compose --version docker-compose version 1.23.1, […]
This article describes the steps to change the system and hardware clock on linux without the need to use ntp. The steps described in this article are performed on CentOS 6. Current System Times & Dates The best way to get started is to find out the times which the system is currently using. One […]
To list startup services with sysctl you can run the following command:
Overview Upgrading via the CLI can be a little bit more convenient if you wish to avoid annoying prompts and install wizards. For Nextcloud this can be done using the occ file which comes as standard inside of the Nextcloud install. Performing upgrade tasks such as this via SSH can be a very useful especially if you […]
Grep is a useful tool to filtering large quantities of data and acquiring just the data you need. In some circumstances the format of the data can be fine and it's easier to remove some other regular recurring lines that impact the structure of the data. Take the following as an example, this data was […]
This has been tried and tested on Fedora based distros. Forcing regeneration of host keys on Debian based distros may be different, you may need to use dpkg-reconfigure (dpkg-reconfigure openssh-server). If you are having issues with SSH such as errors staring SSH service and the log or journald complains about SSH host keys you can […]
If you are looking to determine the state of a host before actioning something on it then the code snippet below is perfect.