0

Moving from netstat to iproute2 ss I noticed that the output from ss tends to spill over into empty "new lines" when connecting via SSH from a cygwin terminal. e.g.:

user@host:~ $ ss -4t
State             Recv-Q             Send-Q                         Local Address:Port                            Peer Address:Port

ESTAB             0                  36                              192.168.1.70:ssh                            192.168.1.121:52947

When testing with ubuntu/terminal ss appears to dynamically scale the output to the maximum width of the window. netstat on the other hand uses a fixed width output, which works when connecting from cygwin.

From this post, piping into column -t seams to be a workaround:

user@host:~ $ ss -4t | column -t
State  Recv-Q  Send-Q  Local             Address:Port         Peer  Address:Port
ESTAB  0       36      192.168.1.70:ssh  192.168.1.121:54266

Might there be some terminal property not being set correctly? I appreciate your insights.

0

In absence of a better approach, I've appended my .bashrc file with:

ss() {
 command ss "$@" | column -t
}

which did work for my setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.