Friday 27 June 2014

error-pam-authentication-error-for-root-when-trying-to-ssh-to-freebsd-server-as-root

By default ssh is disabled in Freebsd and work around is shared my one of my posts, http://www.zyraxtech.com/2014/06/permission-denied-keyboard-interactive-authentication/ :
However We faced an issue with one of our old server who’s ssh was configured, by one of the lines were changed mistakenly which caused following error:
error: PAM: authentication error for root from 192.168.XXX.XXX
following lines were checked and changed:
PermitRootLogin yes 
PasswordAuthentication yes 
AllowUsers vht
to
AllowUsers root
NOTE: allowuser line was mistakenly changed.
Hope this helps !

Wednesday 18 June 2014

unknown modifier ‘t’ freebsd ports error

Recently faced an error to install port in freebsd 9.0, the reason for this type of error is due to freebsd support for older version is no longer there. below is the screen shot of the error:


“unknown modifier ‘t’ freebsd ports”
to overcome this I updated freebsd 9.0 to 9.1 and then installed the ports easily.

root@freebsd:/root#freebsd-update upgrade -r 9.1-RELEASE
(to update release from 9.0 to 9.1)
/usr/sbin/freebsd-update install
(to install the update)
then reboot the server and run the above command again
root@freebsd:/root#portsnap fetch update
(to update the ports)
then you can install the desired ports without any error!

HOPE it works for you as well !

Saturday 7 June 2014

Permission Denied keyboard-interactive authentication

By default Freebsd has root ssh disabled. Even in Ubuntu 14.04 it is not allowed with some other linux/unix distros as well.
Following error we get on screen even after entering correct password:
freebsd root ssh
To overcome this issue edit following ssh file: (ee is editor in freebsd)
ee /etc/ssh/sshd_config
in the file remove # from port 22
and remove # from
PermitRootLogin no
to
PermitRootLogin yes
then restart sshd demon
/etc/rc.d/sshd restart 

Remote host identification has changed

Normally this issue has a simple solution but people tend not to read whats is required to eliminate the error:
When you run the ssh command following error is received:
ssh issueto remove this error, you just need to edit single line on the following path (I am using nano as editor):
 nano /root/.ssh/known_hosts
ssh issue1Remove the line which corresponds to the IP address which you were trying to access via ssh. save the file and again try to ssh.