OPS245 Lab 8 Newversion: Difference between revisions
No edit summary |
|||
Line 7: | Line 7: | ||
** Firefox is the client, it's making the request for a web page | ** Firefox is the client, it's making the request for a web page | ||
** The web server (Apache) on wiki.littlesvr.ca is the server, responding the the request with the contents of the web page | ** The web server (Apache) on wiki.littlesvr.ca is the server, responding the the request with the contents of the web page | ||
* When you use your phone to check your | * When you use your phone to check your email: | ||
** The email application on your phone is the client, making the request to get new email | ** The email application on your phone is the client, making the request to get new email | ||
** The | ** The email server (e.g. Postfix, Gmail, Office365) is the server, responding to the request with a list of new emails | ||
Most of a Linux system administrator's work is done in a terminal, and most of that is done on remote machines. Few companies can afford to hire in-house administrators, and those that can afford it have too many machines to connect keyboards and monitors to. But everything is connected to a network. | Most of a Linux system administrator's work is done in a terminal, and most of that is done on remote machines. Few companies can afford to hire in-house administrators, and those that can afford it have too many machines to connect keyboards and monitors to. But everything is connected to a network. | ||
Line 17: | Line 17: | ||
* The '''ssh''' program is the client, connecting to the ssh server, sends what you type to the server and prints the output which those commands print on the server. | * The '''ssh''' program is the client, connecting to the ssh server, sends what you type to the server and prints the output which those commands print on the server. | ||
* The ssh server (sshd) is the software on the destination machine which receives commands from the client, executes them, and sends the output of those commands back to the client. | * The ssh server (sshd) is the software on the destination machine which receives commands from the client, executes them, and sends the output of those commands back to the client. | ||
= Temporary account on ops345.ca = | |||
I've created an account for you on ops345.ca which you can use for SSH practice. Please don't abuse this account (i.e. don't upload 1GB videos to it). | |||
You should have received an email like this: | |||
[[File:OPS345NewAccountEmail.png|center]] | |||
Note that your username has an ops145_ prefix. Your password is randomly generated. | |||
= ssh to ops345.ca = | |||
You will be connecting to the ops345.ca server from your workstation using the '''ssh''' client. | |||
The syntax for a basic ssh command is:<syntaxhighlight lang="bash"> | |||
ssh usernameOnServer@serverAddress | |||
</syntaxhighlight>The username is in your email. The server address is ops345.ca. After you run the ssh command: it will ask you for a password, which is the password in your email. | |||
The first time you ssh to a server: the ssh client will give you a scary warning message about authenticity. It's a very interesting message which is worth understanding, but we don't have time to talk about it in this course. Just enter "yes" in the prompt. | |||
[[File:FirstSSHtoops345.ca.png|center]] | |||
= Also = | = Also = |
Revision as of 17:17, 15 March 2024
The server concept
For most people a server is something on the internet you connect to, and a client is something you connect from. That sort of view is mostly valid, but it breaks down a little when the server and the workstation are the same machine.
A couple of examples:
- When you connect to wiki.littlesvr.ca in Firefox:
- Firefox is the client, it's making the request for a web page
- The web server (Apache) on wiki.littlesvr.ca is the server, responding the the request with the contents of the web page
- When you use your phone to check your email:
- The email application on your phone is the client, making the request to get new email
- The email server (e.g. Postfix, Gmail, Office365) is the server, responding to the request with a list of new emails
Most of a Linux system administrator's work is done in a terminal, and most of that is done on remote machines. Few companies can afford to hire in-house administrators, and those that can afford it have too many machines to connect keyboards and monitors to. But everything is connected to a network.
The same client-server model applies here. You connect from a terminal on your workstation to the machine you want to work with. In this case:
- The ssh program is the client, connecting to the ssh server, sends what you type to the server and prints the output which those commands print on the server.
- The ssh server (sshd) is the software on the destination machine which receives commands from the client, executes them, and sends the output of those commands back to the client.
Temporary account on ops345.ca
I've created an account for you on ops345.ca which you can use for SSH practice. Please don't abuse this account (i.e. don't upload 1GB videos to it).
You should have received an email like this:
Note that your username has an ops145_ prefix. Your password is randomly generated.
ssh to ops345.ca
You will be connecting to the ops345.ca server from your workstation using the ssh client.
The syntax for a basic ssh command is:
ssh usernameOnServer@serverAddress
The username is in your email. The server address is ops345.ca. After you run the ssh command: it will ask you for a password, which is the password in your email.
The first time you ssh to a server: the ssh client will give you a scary warning message about authenticity. It's a very interesting message which is worth understanding, but we don't have time to talk about it in this course. Just enter "yes" in the prompt.
Also
- Create an account on ops345.ca for ssh practice
- The "server" concept
- Using ssh to control a remote Linux server
- Remote credentials don't need to match local credentials
- Permissions work the same way, they apply to the user who is logged in
- Practice with permissions on files you own and files you don't own
- Copy files between Linux machines using scp
- Copy directories
- Note how ownership applies to files transferred between systems