0

I'm just starting out with SSH and I need somebody who's knowledgeable on SSH on Ubuntu/Linux to give me the whole picture of working with SSH.

I currently know that SSH is used to securely connect to a computer over a network and then be able to execute commands on that computer from your workstation's terminal.


With the default setup on a clean Ubuntu 14.04 desktop install, I try to connect to an Ubuntu server (also clean install, no extra packages) with the ssh command and the ip address of the server:

ssh larryserver@192.168.0.3

With that I get the message "connection refused".

Having read https://help.ubuntu.com/community/SSH I understand that only a ssh client (openssh client specifically) comes installed with Ubuntu and a ssh server does not.

I then install the openssh-server package on the server machine and repeat the above command, which then allows me to enter the password for the larryserver user on the server machine. I'm in.

What I would like to know about ssh besides what the ubuntu help page can teach me is where ALL of the important files are located that have to do with ssh on Ubuntu and what they are used for.

/usr/bin/ssh

The file above, that's the binary that executes when I type the ssh command into the terminal correct?


If openssh is A client & server for ssh then what tells the ssh command that this client/server config is in use? If I installed a client and server package that is not openssh, how does the ssh command use those instead? Or does the ssh command only use openssh?

Thanks!

closed as too broad by muru, Pilot6, David Foerster, waltinator, Eric Carvalho Sep 14 '15 at 16:09

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

What I would like to know about ssh besides what the ubuntu help page can teach me is where ALL of the important files are located that have to do with ssh on Ubuntu and what they are used for.

See manual page for ssh(1) and sshd(8). There is chapter called FILES, where you can see all files related to ssh and sshd (ssh server).

The file above, that's the binary that executes when I type the ssh command into the terminal correct?

Yes

If openssh is A client & server for ssh then what tells the ssh command that this client/server config is in use?

When you run ssh in debug mode (ssh -vvv remote_host), you will get much more information about what is going under the hood, including the configuration files used.

If you mean the invoking ssh, it is basic *NIX stuff and it is handled by $PATH environment variable.

If I installed a client and server package that is not openssh, how does the ssh command use those instead? Or does the ssh command only use openssh?

Do you have some example of "other client and server" for ssh? Last time I remember, openssh has around 80% "market share".

But I don't see any problem with other package providing binary placed in the same path instead of openssh. It is just C code compiled into binary format placed in /usr/bin/ folder.

  • I guess the other 20% would be the examples – Larry Lawless Sep 14 '15 at 12:37
1

I'm just starting out with SSH and I need somebody who's knowledgeable on SSH on Ubuntu/Linux to give me the whole picture of working with SSH.

SSH is Secure SHell - a network protocol implemented by various programs that allows machines to communicate. openSSH is a implementation (others can be found here) - one of the most popular ones though.

What I would like to know about ssh besides what the ubuntu help page can teach me is where ALL of the important files are located that have to do with ssh on Ubuntu and what they are used for.

You can see some of the 'important' files by looking at the filelist for the package (n.b. you can check the package directly, you don't have to use the online filelists) - most other files important to the package are included in dependency packages listed here (e.g. for libssl).

Much of the stuff is compiled (so you can't really see what it does looking at the file), if you want to know what it is doing you may be able to get some idea of what it does from the source code |1| |2|

/usr/bin/ssh

The file above, that's the binary that executes when I type the ssh command into the terminal correct?

Usually yes. Depends on the $PATH |1| |2|. If ssh executable is later in the path that may be executed instead

With the above two points you can learn more about the package etc. by examining:

  • The Filesystem Hierarchy Standard - there's a place for nearly everything - bin for executable binaries, /etc for configuration etc.

  • The Client Server model |1| |2| (where the server waits for things from the client, and processes them)

Having read https://help.ubuntu.com/community/SSH I understand that only a ssh client (openssh client specifically) comes installed with Ubuntu and a ssh server does not.

Thats because not everyone wants something (which has a open port that can be connected too) running on their machine that allows others to access it remotely - like Windows running no firewall :) (there is also the principle that more points of access are harder to secure). The SSH client is useful as it can be useful without being much of a pain otherwise.


N.B. I know some of this stuff, feel free to criticize :D

Not the answer you're looking for? Browse other questions tagged or ask your own question.