Ask a question »

Installing a SSH server on Ubuntu

August 2015

SSH server allows users to connect remotely in a secure way and allows access to file transfers. Installation of the SSH server on Ubuntu requires the use of command 'sudo aptitude install ssh' and through the Login ID and the password reported in Ubuntu , one can have encrypted remote access. To connect, the command line must be used and the server can be accessed from Windows through open source clients such as PuTTY and WinSCP. SSH server can be installed through a proxy server after the package connect-proxy gets installed.

Installing a SSH server on Ubuntu



  • An SSH server allows you to remotely access your machine.
  • You'll have access to the remote console (equivalent to telnet, but secure) and the ability to transfer files.

Installation

  • The easiest way is to use: sudo aptitude install SSH
  • You can now connect remotely in a secure way.
  • Use the login/password of users reported in Ubuntu.

Connection


SSH through a proxy

  • First install the package connect-proxy:
  • sudo aptitude install connect-proxy
  • Edit /etc/ssh/ssh_config to enable SSH via proxy:
  • sudo echo 'ProxyCommand /usr/bin/connect-proxy -4 -S monproxy.domaine.com:port %h %p' >> /etc/ssh/ssh_config
  • Be sure to replace "proxy.domaine.com" and "port" with the name of your proxy and port number.

Additional tip


To run the ssh server on another port which the port 22 standard:
  • 1. Open the configuration file: sudo gedit/etc/ssh/sshd_config
  • 2. Locate the line Port 22 and replace by the value of your choice (eg port 741)
  • 3. Restart the ssh server: sudo/etc/init.d/ssh restart


This little trick ensures that the server is identified by a scan of IP address ranges, and thus reduce some risks.
For unlimited offline reading, you can download this article for free in PDF format:
Installing-a-ssh-server-on-ubuntu.pdf

See also

In the same category

Published by deri58. - Latest update by Paul Berentzen
This document entitled « Installing a SSH server on Ubuntu » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.