Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me

You are here: Linux101 > linux101_cclud_sshd
In Linux101 how to CCLUD Services?

To do Machine Learning on Linux, the first Service I should learn about is openssh.

Once openssh is installed and running, then I will be able to 'ssh-in' to the machine.

Openssh is running software which waits for work to do.

This behavior defines what a service is.

Other examples of services are the Apache webserver and the PostgreSQL database server.

On Ubuntu, I setup these services using the aptitude utility.

Here is a demo of me installing and then starting the openssh server:
root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ aptitude show openssh-server
Package: openssh-server
State: not installed
Multi-Arch: foreign
Version: 1:6.6p1-2ubuntu2
Priority: optional
Section: net
Maintainer: Ubuntu Developers 
Architecture: amd64
Uncompressed Size: 951 k
Depends: libc6 (>= 2.17), libck-connector0 (>= 0.2.1), libcomerr2 (>= 1.01),
         libdbus-1-3 (>= 1.0.2), libgssapi-krb5-2 (>= 1.10+dfsg~), libkrb5-3 (>=
         1.6.dfsg.2), libpam0g (>=, libselinux1 (>= 1.32), libssl1.0.0
         (>= 1.0.1), libwrap0 (>= 7.6-4~), zlib1g (>= 1:1.1.4), debconf (>= 0.5)
         | debconf-2.0, init-system-helpers (>= 1.13~), openssh-client (=
         1:6.6p1-2ubuntu2), sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16),
         libpam-runtime (>= 0.76-14), libpam-modules (>= 0.72-9), adduser (>=
         3.9), dpkg (>= 1.9.0), lsb-base (>= 4.1+Debian3), procps,
Recommends: xauth, ncurses-term, ssh-import-id
Suggests: ssh-askpass, rssh, molly-guard, ufw, monkeysphere
Conflicts: sftp, sftp, ssh-socks, ssh-socks, ssh2, ssh2, openssh-server
Replaces: ssh, ssh, ssh-krb5, ssh-krb5
Provides: openssh-server, ssh-server
Provided by: openssh-server
Description: secure shell (SSH) server, for secure access from remote machines
 This is the portable version of OpenSSH, a free implementation of the Secure
 Shell protocol as specified by the IETF secsh working group. 
 Ssh (Secure Shell) is a program for logging into a remote machine and for
 executing commands on a remote machine. It provides secure encrypted
 communications between two untrusted hosts over an insecure network. X11
 connections and arbitrary TCP/IP ports can also be forwarded over the secure
 channel. It can be used to provide applications with a secure communication
 This package provides the sshd server. 
 In some countries it may be illegal to use any encryption at all without a
 special permit. 
 sshd replaces the insecure rshd program, which is obsolete for most purposes.

root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ 

root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ aptitude install openssh-server
The following NEW packages will be installed:
  libck-connector0{a} ncurses-term{a} openssh-server openssh-sftp-server{a} 
  python-requests{a} python-urllib3{a} ssh-import-id{a} 
0 packages upgraded, 7 newly installed, 0 to remove and 296 not upgraded.
Need to get 698 kB of archives. After unpacking 3,835 kB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 trusty/main libck-connector0 amd64 0.4.5-3.1ubuntu2 [10.5 kB]
Get: 2 trusty/main ncurses-term all 5.9+20140118-1ubuntu1 [243 kB]
Get: 3 trusty-updates/main openssh-sftp-server amd64 1:6.6p1-2ubuntu2 [34.1 kB]
Get: 4 trusty-updates/main openssh-server amd64 1:6.6p1-2ubuntu2 [319 kB]
Get: 5 trusty-updates/main python-urllib3 all 1.7.1-1ubuntu0.1 [39.3 kB]
Get: 6 trusty-updates/main python-requests all 2.2.1-1ubuntu0.1 [42.9 kB]
Get: 7 trusty/main ssh-import-id all 3.21-0ubuntu1 [9,624 B]
Fetched 698 kB in 1s (373 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libck-connector0:amd64.
(Reading database ... 167417 files and directories currently installed.)
Preparing to unpack .../libck-connector0_0.4.5-3.1ubuntu2_amd64.deb ...
Unpacking libck-connector0:amd64 (0.4.5-3.1ubuntu2) ...
Selecting previously unselected package ncurses-term.
Preparing to unpack .../ncurses-term_5.9+20140118-1ubuntu1_all.deb ...
Unpacking ncurses-term (5.9+20140118-1ubuntu1) ...
Selecting previously unselected package openssh-sftp-server.
Preparing to unpack .../openssh-sftp-server_1%3a6.6p1-2ubuntu2_amd64.deb ...
Unpacking openssh-sftp-server (1:6.6p1-2ubuntu2) ...
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-server_1%3a6.6p1-2ubuntu2_amd64.deb ...
Unpacking openssh-server (1:6.6p1-2ubuntu2) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../python-urllib3_1.7.1-1ubuntu0.1_all.deb ...
Unpacking python-urllib3 (1.7.1-1ubuntu0.1) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../python-requests_2.2.1-1ubuntu0.1_all.deb ...
Unpacking python-requests (2.2.1-1ubuntu0.1) ...
Selecting previously unselected package ssh-import-id.
Preparing to unpack .../ssh-import-id_3.21-0ubuntu1_all.deb ...
Unpacking ssh-import-id (3.21-0ubuntu1) ...
Processing triggers for man-db ( ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Setting up libck-connector0:amd64 (0.4.5-3.1ubuntu2) ...
Setting up ncurses-term (5.9+20140118-1ubuntu1) ...
Setting up openssh-sftp-server (1:6.6p1-2ubuntu2) ...
Setting up openssh-server (1:6.6p1-2ubuntu2) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
initctl: Unknown job: ssh
Setting up python-urllib3 (1.7.1-1ubuntu0.1) ...
Setting up python-requests (2.2.1-1ubuntu0.1) ...
Setting up ssh-import-id (3.21-0ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ 
root@ubutemp /home/dan $ 

For some services the final installation step is to reboot the machine.

A good way to reboot a machine is to issue this shell command as root:
shutdown -r now

You are here: Linux101 > linux101_cclud_sshd Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me