What does stub do on the server side ? And what is a skeleton ?

Th
The key to understanding "stubs" and "skeletons" is to understand the concept of marshalling:
What Is Data Marshalling?
Marshalling (computer science)
How RPC Works
The rmiregistry is just a lookup facility; nothing more. When a server does a bind(), it "registers" itself with the rmiregistry. When a client does a lookup(), he checks what's registered on the server. Nothing more, nothing less.
I don't think it makes sense to quibble about terminology like "skeletons". If you prefer, you can call everything a "stub". The point is, both are PROXIES, both do MARSHALLING, one side exists under the client (that the client calls into), and the other side exists on the server (the skeleton calls into the actual server code).
Hopefully, my explanation and example helped in your another link helped (at least a little).