≡ Menu

sshd server

CentOS Linux: Start / Stop / Restart SSHD Command

I'm a new CentOS Linux server user. How can I start, stop, or restart the OpenSSH (SSHD) server on a CentOS Linux? How can I start SSHD on boot time on a CentOS Linux?
[click to continue…]

Tunneling X Connection Through Intermediate Linux / BSD Gateway

I've ssh gateway behind my NAT firewall. So all users must first login to my gateway host from the internet and then login to other machines on the LAN. This works great for cli based apps. However, few users would like to run x apps from internal LAN hosts and tunnel X display through intermediate ssh gateway and display back output on their local system. For example, from localsystem user makes connection as follows:

ssh -X user@gateway.example.com
ssh -X user@somelan.example.com

X forwarding fails with an error:

Error: Can't open display:

How do I fix this problem and allow users to use X apps with my intermediate Linux / BSD gateway?
[click to continue…]

How To Reuse SSH Connection To Speed Up Remote Login Process

Q. How do I reuse same ssh connection to speed up remote login procedure with OpenSSH client?
[click to continue…]

Red Hat / Centos Install Denyhosts To Block SSH Attacks / Hacking

How do I block and stop attacks on ssh server under CentOS Linux or Red Hat Enterprise Linux server 5.x?
[click to continue…]

Ubuntu Linux OpenSSH Server installation and configuration

Q. I have just installed Ubuntu 6.06 and I would like to allow remote login to my system from home via ssh. How do I install and configure SSH server?

A. OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.

Ubuntu SSHD Installation

Type the following two command to install both ssh client and server:
# sudo apt-get install openssh-server openssh-client

SSHD Configuration

To be frank your server is ready by default. Just test it from your home computer or from same system with the command:
# ssh localhost
# ssh user@your-server-ip-address

How do I use ssh client?

Assuming that your server hostname is userver.mydomain.com and username is vivek, you need to type the following command:
# ssh vivek@userver.mydomain.com
To stop ssh server, enter:
# sudo /etc/init.d/ssh stop
To start sshs server, enter:
# sudo /etc/init.d/ssh start
To restart ssh server, enter:
# sudo /etc/init.d/ssh restart

See also:

Restrict SSH Access Using tcpd (TCPWrapper) on Linux or Unix

How do I use tcpd on a Linux to restrict ssh access?
[click to continue…]