How to tie a rope to both sides without loosing its grip strength?
There are several variants of hitches that allow tightening after they are tied.  The most common is the taut-line hitch.

Wikipedia [citing more authoritative sources]