Category Archives: Linux
Add a Linux User
In order to add a user you should create their group first or decide which preexisting group you will assign them to. If you’re adding a new group for the user: Add the group: groupadd $group Then add the user adduser -g $group -d /home/$username $username This will add a user with the username $username …
Execute commands on remote host
This is a great method to execute commands on a remote server without actually opening another window and running the command directly. Additionally, if you have a server monitor setup this is a great way to restart services if a service crashes. We often use this method on internal servers and when a service outage …
SSH Key Logins
It’s often more secure to establish key logins, or you may want to allow a server to automatically ssh to another to copy over backup files or to run commands. To enable SSH keys: On the server that’s going to make the connection: ssh-keygen -t rsa The command above places the public key that you …
Archive a specific set of files using tar
It’s often necessary to backup a set of files, however you don’t want to archive an entire folder or site. To accomplish this task simply create a text file called filestotar.txt. Then place the full path and file name of each file that you want included in the archive. Then run: tar -cvf backup.tar –files-from=filestotar.txt …
Extract specific folders from a tar archive
Backups or Archives are usually very large and it can take forever to extract all of the files to retrieve a specific folder. Additionally, the drive may be close to it’s maximum capacity and extracting the full archive may not be an option. Here’s how to extract a specific folder from a tar archive: tar …
port 25 telnet example
telnet yourdomain.com 25 helo yourdomain.com mail from: [email protected] rcpt to: [email protected] DATA TestMessage . This is an effective method for testing the connection to port 25 of a mail server to ensure it’s allowing connections.
Update Server Time and Timezone
Linux: User one of the following commands to sync your servers time with the government time servers: rdate -s time.nist.gov ntpdate time.nist.gov If you wish to change the timezone: #set timezone to Eastern cd /etc; mv localtime localtimeOLD; ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime; hwclock –systohc; This would change the timezone to Eastern. In the /usr/share/zoneinfo/US/ folder …
Open SSL and Curl Versions
To get the version of open SSL and Curl in Linux simply use the following commands: [user@hostname]$ openssl version OpenSSL 0.9.7c 30 Sep 2003 and [user@hostname]$ curl -V curl 7.10.8 (i686-pc-linux-gnu) libcurl/7.10.8 OpenSSL/0.9.7c zlib/1.1.3 Protocols: ftp gopher telnet dict ldap http file https ftps Features: SSL libz NTLM
- English Support
- 24/7 x 365
- Branded Support
- Reduced Overhead
- Linux Experts
- Friendly Staff