diff options
| author | Runxi Yu <me@runxiyu.org> | 2025-02-20 11:11:23 +0800 |
|---|---|---|
| committer | Runxi Yu <me@runxiyu.org> | 2025-02-20 11:11:23 +0800 |
| commit | 23d8c8091b3c17642089d34b444d408940734140 (patch) | |
| tree | 83db224f80422ef20a7f603993d2237a305d9086 /ssh_server.go | |
| parent | hooks: Use colorful SSH messages (diff) | |
| download | forge-23d8c8091b3c17642089d34b444d408940734140.tar.gz forge-23d8c8091b3c17642089d34b444d408940734140.tar.zst forge-23d8c8091b3c17642089d34b444d408940734140.zip | |
ssh: Use a blue version message
Diffstat (limited to '')
| -rw-r--r-- | ssh_server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh_server.go b/ssh_server.go index 81906f5..c1eac47 100644 --- a/ssh_server.go +++ b/ssh_server.go @@ -7,6 +7,7 @@ import ( "strings" glider_ssh "github.com/gliderlabs/ssh" + "go.lindenii.runxiyu.org/lindenii-common/ansiec" "go.lindenii.runxiyu.org/lindenii-common/clog" go_ssh "golang.org/x/crypto/ssh" ) @@ -41,7 +42,7 @@ func serve_ssh(listener net.Listener) error { } clog.Info("Incoming SSH: " + session.RemoteAddr().String() + " " + client_public_key_string + " " + session.RawCommand()) - fmt.Fprintln(session.Stderr(), "Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/")+"/:/source/\r") + fmt.Fprintln(session.Stderr(), ansiec.Blue + "Lindenii Forge "+VERSION+", source at "+strings.TrimSuffix(config.HTTP.Root, "/")+"/:/source/" + ansiec.Reset + "\r") cmd := session.Command() |
