Monthly Archives: June 2017

ssh_exchange_identification: Connection closed by remote host

Was getting error while trying to SSH  to one of  the server on port 22

ssh_exchange_identification: Connection closed by remote host

The issue is due to too many excessive connections on port 22

You can fix it by below change  in SSH config

 MaxStartups variable in /etc/ssh/sshd_config to ,

port 2222 or any port you need to  and  
MaxStartups 100

Restart the SSH service ,

service sshd restart

W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B493DBE84A1DB3CD

 

 

While trying to run an update  in Ubuntu 14.04 was getting an error

sudo apt-get update

 

Hit http://security.ubuntu.com trusty-security InRelease
Ign http://ppa.launchpad.net precise InRelease
Get:1 http://ppa.launchpad.net precise Release.gpg [836 B]
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://ppa.launchpad.net precise Release
Ign http://ppa.launchpad.net precise Release
Hit http://security.ubuntu.com trusty-security/restricted Sources
Ign http://ppa.launchpad.net precise/main amd64 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/universe Sources
Ign http://ppa.launchpad.net precise/main i386 Packages/DiffIndex
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://ppa.launchpad.net precise/main Translation-en
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Ign http://ppa.launchpad.net precise/main Translation-en_US
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Ign http://nl.archive.ubuntu.com trusty InRelease
Hit http://nl.archive.ubuntu.com trusty-updates InRelease
Hit http://nl.archive.ubuntu.com trusty Release.gpg
Hit http://nl.archive.ubuntu.com trusty-updates/main Sources
Hit http://nl.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://nl.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nl.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://nl.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://nl.archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://nl.archive.ubuntu.com trusty Release
Hit http://nl.archive.ubuntu.com trusty/main Sources
Hit http://nl.archive.ubuntu.com trusty/restricted Sources
Hit http://nl.archive.ubuntu.com trusty/universe Sources
Hit http://nl.archive.ubuntu.com trusty/multiverse Sources
Hit http://nl.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://nl.archive.ubuntu.com trusty/main i386 Packages
Hit http://nl.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://nl.archive.ubuntu.com trusty/universe i386 Packages
Hit http://nl.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://nl.archive.ubuntu.com trusty/main Translation-en
Hit http://nl.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://nl.archive.ubuntu.com trusty/restricted Translation-en
Hit http://nl.archive.ubuntu.com trusty/universe Translation-en
Ign http://nl.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://nl.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 836 B in 19s (43 B/s)
Reading package lists… Done
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B493DBE84A1DB3CD

 

The way to fix this error is by adding a key

Below is the step to add keys

sudo apt-key adv –keyserver ha.pool.sks-keyservers.net –recv-keys B493DBE84A1DB3CD

Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –homedir /tmp/tmp.z6Pp5ZKvEp –no-auto-check-trustdb –trust-model always –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver ha.pool.sks-keyservers.net –recv-keys B493DBE84A1DB3CD
gpg: requesting key 4A1DB3CD from hkp server ha.pool.sks-keyservers.net
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD was created 145258229 seconds in the future (time warp or clock problem)
gpg: key 4A1DB3CD: public key “Launchpad PPA for Roman Koblov” imported

 

Now apt-get update work fine without any errors

 

 

 

FAILED to open PAM security session (Module is unknown)

Cron Jobs in server were not getting executed automatically

On investigating I could see error like

Jun 16 14:05:01 ok1110 crond[5913]: (root) FAILED to open PAM security session (Module is unknown)
Jun 16 14:05:01 ok1110 crond[5912]: (root) FAILED to open PAM security session (Module is unknown)
Jun 16 14:06:01 ok1110 crond[6021]: (root) FAILED to open PAM security session (Module is unknown)

On deeper investigating I found the issue was in file

 /etc/pam.d/crond

I went ahead and copied file from working server and fixed this issue.

  • PAM configuration is the default:
$ cat /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
auth       sufficient pam_env.so
auth       required   pam_rootok.so
auth       include    system-auth
account    required   pam_access.so
account    include    system-auth
session    required   pam_loginuid.so
session    include    system-auth


If this file is modified the crond does not work for any users.

 

 

 

E: Unable to locate package Ubuntu

While trying to install some new software in Ubuntu I was getting error

E: Unable to locate package Ubuntu

I tried updating using command sudo apt-get update

However it didnt work

sudo apt-get install anydesk_2.9.1-1_amd64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package anydesk_2.9.1-1_amd64.deb
E: Couldn’t find any package by glob ‘anydesk_2.9.1-1_amd64.deb’
E: Couldn’t find any package by regex ‘anydesk_2.9.1-1_amd64.deb’
home@home:~/Desktop/shraddha$ cd ..

 

You need to use command  sudo dpkg –install    filename.deb to get this installed

 

sudo dpkg –install anydesk_2.9.1-1_amd64.deb
Selecting previously unselected package anydesk.
(Reading database … 247265 files and directories currently installed.)
Preparing to unpack anydesk_2.9.1-1_amd64.deb …
Unpacking anydesk (2.9.1-1) …
Setting up anydesk (2.9.1-1) …
Processing triggers for gnome-menus (3.13.3-6ubuntu3) …
Processing triggers for desktop-file-utils (0.22-1ubuntu5) …
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) …
Rebuilding /usr/share/applications/bamf-2.index…
Processing triggers for mime-support (3.59ubuntu1) …
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) …
Processing triggers for man-db (2.7.5-1) …