How can one test their 1gbps server connection via ssh?

1

My ubuntu server has a 1gbps connection. How can I test this connection via ssh terminal?

Patoshi パトシ

Posted 2019-09-16T21:33:25.730

Reputation: 1 687

scp would be a start. – Michael Harvey – 2019-09-16T21:43:20.167

Answers

2

For a general command line Internet speed test, you could use speedtest-cli.

One-liner usage:

python3 <(curl -sL https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py)

Note: The above command assumes that you trust the Python 3 code retrieved from https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py.

Sample output:

deltik@box1 [~]$ python3 <(curl -sL https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py) --server 17394
Retrieving speedtest.net configuration...
Testing from OVH Hosting (167.114.208.99)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Bell Canada (Toronto, ON) [3.18 km]: 19.545 ms
Testing download speed................................................................................
Download: 2366.49 Mbit/s
Testing upload speed......................................................................................................
Upload: 689.48 Mbit/s

If you want to test the speed between your server and a client that you control, you can use iPerf3.

First, install iPerf3 on both the client and the server. Ubuntu/Debian installation command:

sudo apt install -y iperf3

On the server, run iperf3 in server mode:

iperf3 -s

On the client, run one of these commands to test the speed:

(Replace XXX.XXX.XXX.XXX with your server's IP address.)

  • Client to server TCP transfer:

    iperf3 -c XXX.XXX.XXX.XXX
    
  • Server to client TCP transfer:

    iperf3 -R -c XXX.XXX.XXX.XXX
    

Deltik

Posted 2019-09-16T21:33:25.730

Reputation: 16 807