Remote Login
By
Velur Siddarth
Ashwin N
Sachin Asoka
Nitin B N
Remote login is a client - server application used to connect to a computer on a network and use it's resources by using it's terminal (shell).
Remote login was one of the first application layer (OSI Layer 7) applications. What we've developed is a simple implementation of a rlogin server and a client.
Files
The zip file should contain
rl.c - rlogin client
rd.c - rlogin server
zterm.c - rlogin client with GUI (built using GTK+)
Compiling
We've tested compiling these on RedHat Linux 7.0. You shouldn't have problems with other distros or versions, but just check that u have the development packages installed.
To compile rlogin server,
gcc rd.c -o server
To compile rlogin client,
gcc rl.c -o client
To compile the GUI client,
gcc zterm.c -o grl -Wall `gtk-config --cflags` `gtk-config --libs` -lzvt -lgdk_imlib -lutil
Running
Assuming, a LAN like shown below,
-------------------------------------------------- LAN
| |
------------------ ------------------
| | | |
| 192.168.1.10 | | 192.168.1.30 |
| | | |
------------------ ------------------
server m/c client m/c
I assume that u want to run the server on the comp with IP 192.168.1.10 and the client on IP 192.168.1.30.
The executable file 'server' compiled from rd.c is needed on the server m/c. Similarly, files 'client' and 'grl' are needed on the client m/c.
Note :
- The server can handle MANY clients at the same time.
- The server needs to be running before connecting from client.
- The GUI client 'grl' requires X therefore it should be run from a Xterminal like konsole opened within KDE, Gnome etal.
To run the server do,
./server
This runs the rlogin server in the background on port 3000 (default).
To run the server on some other port (say port 2500) do,
./server 2500
Note : Always runs the server as 'root' user
To now connect to the computer running as server run the client,
./client 192.168.1.10
Here I've assumed that the server is running on the computer with IP address 192.168.1.10. If the server is running on a port other than 3000 then that too needs to be specified. Assuming our earlier server that running on port 2500, to run the client we do,
./client 192.168.1.10 2500
The GUI client is similar, it can be run as,
./grl
Now u can login into the server machine using logins and passwords available on the server machine.
That is, if there is a login called X on the server, then if the server is running u are able to login from any networked PC running the client as X. You will be directed to his home dir and will be able to use all the text based tools like ls, mv, cp, vim, rmdir, mkdir etc available on the server machine.
Note : You cannot login as root directly from the client. But, u can login as a user and then do 'su' and become root.
Ashwin N.
ashwin_n@gmx.net
http://ash.webhop.net/
