LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How does ssh remote login work? (https://www.linuxquestions.org/questions/linux-networking-3/how-does-ssh-remote-login-work-791212/)

kamrinjacobs 02-24-2010 04:25 AM

How does ssh remote login work?
 
Hi... After reading up about ssh, I understand that it's a protocol used for sending encrypted data over a network. However, I don't understand what's going on when I login to my Ubuntu PC
using ssh [over the network]. How does the ssh client application 'know' that it has to take input from one computer
and pass it to the other?

EDIT; To put it another way, one could send a mp3 file over ssh right? So instead of the file, what tell the ssh client that the input and output of the computers is what has to be sent?

michaelk 02-24-2010 05:03 AM

When you login into your Ubuntu PC you are using a remote shell i.e. its the same thing as typing in commands in a console window as if you are sitting behind the computer itself. In a nutshell ssh is a client/server application, i.e. the client sends commands (whatever you type) to the server and the server executes those commands and sends the results back.

ssh is a remote shell only. If you want to transfer files then you need to use either a secure FTP console application like scp,sftp or some GUI app like gFTP.

zhjim 02-24-2010 08:58 AM

Quote:

Originally Posted by kamrinjacobs (Post 3874847)
EDIT; To put it another way, one could send a mp3 file over ssh right? So instead of the file, what tell the ssh client that the input and output of the computers is what has to be sent?

The programmer told it to do so :p

It something like a remote login. The client connects to the server and gets a terminal (tty) assigned to it. After this it's just like sitting in front of the machine. You type -> SSH clients tells -> SSH Server -> Shell executes commands -> Output of shell is sent to ssh client which displays it for you.

Something like this....

framp 02-24-2010 02:31 PM

Quote:

Originally Posted by kamrinjacobs (Post 3874847)
EDIT; To put it another way, one could send a mp3 file over ssh right? So instead of the file, what tell the ssh client that the input and output of the computers is what has to be sent?

ssh ist just a channel to acces a remote console. BUT - it also can be used to forward unsecure traffic on a secure channel (X forwarding). If you want to copy files from A to B you should use scp.


All times are GMT -5. The time now is 01:07 PM.