Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Linux Tutorial and something else…..
I don't know what's the matter with people: they don't learn by understanding, they learn by some other way — by rote or something. Their knowledge is so fragile! (Feynman)
Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB
When trying to install or update packages using yum on client systems, yum is failing with one of the following errors:
[Errno 14] HTTP Error 404: Not Found
[Errno 14] HTTPS Error 404 - Not Found
[Errno 14] HTTP Error 404: Status 404
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403"
[Errno 14] Error 60 - It was impossible to connect to the CentOS servers
1. You are not connected to the internet.
2. This issue can also occur if the system is able to communicate with given server but could not find or access the requested package or path on the server.
3. You have a misconfigured proxy server.
1. Validate the system can see things on the internet.
2. This issue can also occur due to corruption of the local machine cache, try to clear cache on system:
yum clean all
rm -rf /var/cache/yum/*
3. If you have a proxy server, validate it is configured properly in /etc/yum.conf. Here is an example (your names, passwords, and port numbers will obviously be different).
proxy=http://mystuff.mydomain.com:1234 # Account details for yum connections proxy_username=proxy-user proxy_password=proxy-password
If that does not work or if you still need help, try one of our community help platforms:
List of user’s group
# groups username
# adduser username -g sftp -s /sbin/nologin # passwd username
in general to add a new group
# groupadd
in general to add user to a group
#usermod -G group username
Open and add the following lines to /etc/ssh/sshd_config
configuration file:
list of groups and its users # cat /etc/group Subsystem sftp internal-sftp Match Group sftp ChrootDirectory /home/%u ForceCommand internal-sftp X11Forwarding no AllowTcpForwarding no
# systemctl restart sshd OR # service sshd restart then check the user home directory permissions # ls /home/ -ltra in case run this # chmod 755 /home/username/ # chown root:sftp /home/username/ -Rf
# chown username:sftp /home/username/basedir
I had this error when I tried to create folder in basedir:
mkdir /New directory: permission denied
after googlig a lot I found this here (Thanks):
# setsebool -P ssh_chroot_rw_homedirs on
# restorecon -R /home/username
After this, sftp works as expected, even when chrooted, without having to disable SELinux completely.
——other explanation——
This tutorial will help you to create SFTP only user (without ssh access) on CentOS and RedHat systems. The user can connect the server with SFTP access only and allowed to access the specified directory. User can’t SSH into the server. Follow the below tutorial to create sftp only account.
First of all, create a user account to use for sftp access. Below command will create user named sftpuser with no shell access.
sudo adduser --shell /bin/false sftpuser sudo passwd sftpuser
Now, create the directory structure to be accessible by sftp user.
sudo mkdir -p /var/sftp/files
Change the ownership of the files directory to sftp user. So that sftpuser can read and write on this directory.
sudo chown sftpuser:sftpuser /var/sftp/files
And set the owner and group owner of the /var/sftp to root. The root user has read/write access on this access. Group member and other account have only read and execute permissions.
sudo chown root:root /var/sftp sudo chmod 755 /var/sftp
Now edit the SSH configuration file in a text editor
sudo vim /etc/ssh/sshd_config
and add the following settings at end of file.
Match User sftpuser ForceCommand internal-sftp PasswordAuthentication yes ChrootDirectory /var/sftp PermitTunnel no AllowAgentForwarding no AllowTcpForwarding no X11Forwarding no
Save the configuration and restart SSH service to apply changes.
sudo systemctl restart sshd.service
yum list installed
Yum-utils is an assortment of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration.
To install it, run the command below as root, otherwise, use sudo command:
# yum update && yum install yum-utils
Once you have it installed, type the repoquery command below to list all installed packages on your system:
# repoquery -a --installed
To list installed packages from a particular repository, use the yumdb program in the form below:
# yumdb search from_repo base
Log in to your server via SSH and type in the following command:
iptables -L -n
Look for the IP address you want to unblock / unban.
Now we must find the jail name this IP address is in. To do so, type the following to find the jail list settings:
fail2ban-client status
For this example, we will remove an IP address jailed within ssh. To do so, type in the following:
fail2ban-client set <jail-name> unbanip 123.123.123.123
The IP address should now be unbanned from fail2ban.
fail2ban-client set apache-auth unbanip 83.99.83.189
fail2ban-client set apache-badbots unbanip 83.99.83.189
fail2ban-client set apache-botsearch unbanip 83.99.83.189
fail2ban-client set apache-modsecurity unbanip 83.99.83.189
fail2ban-client set apache-nohome unbanip 83.99.83.189
fail2ban-client set apache-overflows unbanip 83.99.83.189
fail2ban-client set apache-shellshock unbanip 83.99.83.189
fail2ban-client set courier-auth unbanip 83.99.83.189
fail2ban-client set courier-smtp unbanip 83.99.83.189
fail2ban-client set cyrus-imap unbanip 83.99.83.189
fail2ban-client set dovecot unbanip 83.99.83.189
fail2ban-client set dropbear unbanip 83.99.83.189
fail2ban-client set drupal-auth unbanip 83.99.83.189
fail2ban-client set ispconfig unbanip 83.99.83.189
fail2ban-client set php-url-fopen unbanip 83.99.83.189
fail2ban-client set postfix unbanip 83.99.83.189
fail2ban-client set postfix-rbl unbanip 83.99.83.189
fail2ban-client set postfix-sasl unbanip 83.99.83.189
fail2ban-client set pure-ftpd unbanip 83.99.83.189
fail2ban-client set recidive unbanip 83.99.83.189
fail2ban-client set roundcube-auth unbanip 83.99.83.189
fail2ban-client set selinux-ssh unbanip 83.99.83.189
fail2ban-client set sendmail-auth unbanip 83.99.83.189
fail2ban-client set sendmail-reject unbanip 83.99.83.189
fail2ban-client set sshd unbanip 83.99.83.189
fail2ban-client set sshd-ddos unbanip 83.99.83.189
fail2ban-client set wordpress unbanip 83.99.83.189
OR
iptables -L f2b-recidive -n | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | grep -v 0.0.0.0 | xargs -n 1 fail2ban-client set recidive unbanip