Skip to content

Commit 5db9290

Browse files
authored
Merge pull request hestiacp#2265 from hestiacp/staging/1.5.1
Staging/1.5.1
2 parents fc21bff + 911c8d5 commit 5db9290

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/v-list-sys-sshd-port

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ csv_list() {
5959
# Variable&Function #
6060
#----------------------------------------------------------#
6161

62-
ports=$(sshd -T | grep '^port'| cut -d ' ' -f2);
62+
version=$(lsb_release -s -r)
63+
64+
if [[ "$version" = 9 || "$version" = 10 ]]; then
65+
ports=$(sshd -T -C "user=root" | grep '^port'| cut -d ' ' -f2);
66+
else
67+
ports=$(sshd -T | grep '^port'| cut -d ' ' -f2);
68+
fi
6369

6470
# Listing data
6571
case $format in

0 commit comments

Comments
 (0)