Slow net work over ssh connection

I was trying to write some code for upgrade my battery system over GX gateway.But it seems hard to keep a ssh connection.Both ssh and scp connection always work under quite a low network so that I cannot even fetch the files(which are placed under /opt/victronenergy).I wish to find out how the upgrade flow works.I wonder if I was working with a wrong intention?Maybe it’s unneccessary to fetch the entire directory? Any reply may be helpful!