WordPress database error: [Got error 28 from storage engine]
SELECT t.*, tt.*, tr.object_id FROM deb78_terms AS t INNER JOIN deb78_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN deb78_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (340) ORDER BY t.name ASC

Howto bind ssh to selected IP address
Nov 082007
 

Sponsored Link

ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure channel.

We all know, by default installation of openssh daemon service (sshd), it binds itself to all existing IP address from given host.

Alternatively, if you wish to bind sshd service to selected IP address, this is possible by simply editing /etc/ssh/sshd_config file.

First, always make a backup copy of conf files you wish to edit.

# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup

Launch your fave text editor and edit /etc/ssh/sshd_config

#vi /etc/ssh/sshd_config

Go to specific lines that shows

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ListenAddress *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you wish to bind ssh to existing 2 IP address, let's say 192.168.1.5 and 192.168.1.7 , this could be done by changing the above sshd_config lines to

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ListenAddress 192.168.1.5
ListenAddress 192.168.1.7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and Restart sshd daemon using the following command

# service sshd restart

One applicable instance that his can be useful is that when you have a group of ssh users and there are times you need to disconnect all those currently logged in ssh users except your own remote ssh connections. This can be simply done by shutting down the other interface from where those ssh users are currently connected. And ofcourse, you need to be currently connected with the other interface before shutting down the other interface or IP address.

Sponsored Link

 Posted by at 3:45 pm

  One Response to “Howto bind ssh to selected IP address”

  1. Hi there,

    and how do I bind sshd to a specific interface?
    The ip address may change – depending on the dhcp lease.

    An even better approach would be to bind to specific interfaces, only when located in a defined zone
    e.g. in home zone the sshd is bound to all interfaces including wifi
    in work zone the sshd is only bound to wired interfaces

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

WordPress database error: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `deb78_options`

WordPress database error: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `deb78_options`

WordPress database error: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `deb78_options`

WordPress database error: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `deb78_options`