Explore information related to ssh

SSH Connection Refused

This article will guide you on how to resolve SSH connection error occur.

Sometimes while connecting to SSH servers, users often encounter "Connection refused" error by port 22. It happens because of several reasons like SSH service is not running, the port is blocked by the firewall, or the server is using a different port. 

It can also occur because of the IP conflict issue.

To SSH on Ubuntu, Open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon and install the openssh-server package by typing: sudo apt update sudo apt install openssh-server. Once the installation is completed, the SSH service will start automatically.

To resolve ssh connection refused:

1. Install an SSH tool such as OpenSSH on the server you want to connect to using the sudo apt install openssh-server command. 

2. If your firewall is blocking your SSH connection. Disable the firewall rules blocking your SSH connection by changing the destination port's settings to ACCEPT.

Read More



Preserve Permissions in rsync

This article will guide you on how to use rsync to preserve permissions. 

Rsync, or Remote #Sync, is a free command-line tool that lets you transfer files and directories to local and remote destinations. #Rsync is used for mirroring, performing backups, or migrating data to other servers.

a = archive - means it preserves #permissions (owners, groups), times, symbolic links, and devices. Use of "/" at the end of path: When using "/" at the end of source, rsync will copy the content of the last folder.

To preserve permissions when files and folders are copied or moved, use the Xcopy.exe utility with the /O or the /X switch. 

The object's original permissions will be added to inheritable permissions in the new location.

To make rsync to preserve timestamps:

1. To overcome this, there is another option that you can specify in the rsync command that will preserve the timestamps during the synchronization process. 

2. Without preserving the timestamp, the files will display the modification date and time as the time that the rsync command was run.

Read More



Install and Configure OpenSSH on windows

This article will guide you on steps to install and configure #OpenSSH on #windows. Also, we saw some common errors relating to OpenSSH.

OpenSSH is the premier connectivity tool for remote login with the #SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks.

i. To install OpenSSH, start Settings then go to Apps > Apps and Features > Manage Optional Features. 

ii. Scan this list to see if OpenSSH client is already installed. 

iii. If not, then at the top of the page select "Add a feature", then: To install the OpenSSH client, locate "OpenSSH Client", then click "Install".

To Enable the OpenSSH Server in Windows 10:

1. Open the #Settings app and go to #Apps -> Apps & features.

2. On the right, click Manage optional features.

3. On the next page, click the button Add a feature.

4. In the list of features, select OpenSSH Server and click on the Install button.

5. Restart Windows 10.

Read More



Transfer Files with Rsync on Windows using SSH connection

This article will guide you on steps to perform Rsync from Windows to Linux over SSH.

#Rsync can use #SSH as a secure transport agent. Make sure rsync is installed by opening a #terminal session and typing rsync --version on each machine.

Most #Linux distributions can now read the FAT32 or NTFS disk formats natively, so you could copy your files to an external hard drive formatted in Windows with either of those file systems, which will then allow you to read the data back easily in Linux.

1. cwRsync is an implementation of rsync for Windows. 

2. rsync uses a #file #transfer technology specified by the rsync algorithm, transferring only changed chunks of files over the network. 

3. #cwRsync can be used for remote file #backup and #synchronization from/to Windows systems.

Read More



New files of configuration for Apache error in Plesk

This article will guide you on methods to fix the Plesk error : new files of configuration for Apache.
The causes of this Plesk error:
1. Mailman package is not installed.
2. Database related error.
3. PHP memory issue.
To fix this Plesk issue:
Mailman package is not installed
When you try to reconfigure the domain, you will get the following error.
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
No valid mailman bindir detected
So, in this case it is clear that the issue is causing because the mailman package is missing.
To fix the issue, you can follow the steps mentioned below.
a) Download and install the mailman package from  http://autoinstall.plesk.com
b) After that remove all entries from the ‘Configurations’ table of the ‘psa’ database.
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"delete from Configurations"
c) Remove all ‘Include’ records from configuration files and all content from the directory below:
# sed -i /Include/d /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/vhosts_bootstrap.conf&& sed -i /include/d /usr/local/psa/admin/conf/nginx_vhosts_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/webmail_horde_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/webmail_atmail_bootstrap.conf&& sed -i /Include/d /etc/httpd/conf.d/zz010_psa_httpd.conf&& rm -f /usr/local/psa/admin/conf/generated/*
d) Now you can reconfigure and that will fix the issues.
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
This will resolve the error.

Read More



Deploy Node js Application to DigitalOcean Server

This article will guide you on how to  deploy node.js application to #DigitalOcean Server.  

To Deploying #Node . js application to DigitalOcean — Setting up the #server:

1. Getting familiar with Digital Ocean and creating your first #droplet.

2. Setting up #SSH and connecting to your server from your local #machine.

3. Setting up a simple Express.js web-server in local machine.

4. Using #Git to deploy your code to server.

Read More



Steps To Harden OpenSSH Client on Ubuntu 18 04

This article will guide you on how to harden #OpenSSH Client by following some quick and easy steps.
#Hardening of the #OS is the act of configuring an OS securely, updating it, creating #rules and #policies to help govern the system in a secure manner, and removing unnecessary applications and services. This is done to minimize a computer OS's exposure to threats and to mitigate possible #risk.

Read More



How to enable SSH access on DirectAdmin

This article will help you know the best method to enable ssh access for a user in DirectAdmin control panel and also fix common issues encountered while creating a user to use with SSH.

Read More



Fix Rsync error error in IPC code code 14

When files are copied from one server to another there might be synchronization related issues such as "Rsync error: error in IPC code(code 14)".

Read More