fix: correct read/write handling in CustomWriter
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 5m7s
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 5m7s
This commit is contained in:
15
main.go
15
main.go
@ -10,28 +10,25 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
||||
|
||||
sshConfig := &ssh.ServerConfig{
|
||||
NoClientAuth: true,
|
||||
ServerVersion: "SSH-2.0-TunnlPls-1.0",
|
||||
PasswordCallback: func(conn ssh.ConnMetadata, password []byte) (*ssh.Permissions, error) {
|
||||
return nil, nil
|
||||
},
|
||||
}
|
||||
|
||||
log.SetOutput(os.Stdout)
|
||||
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
||||
|
||||
privateBytes, err := os.ReadFile(utils.Getenv("ssh_private_key"))
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load private key : %s", err.Error())
|
||||
log.Fatalf("Failed to load private key: %s", err)
|
||||
}
|
||||
|
||||
private, err := ssh.ParsePrivateKey(privateBytes)
|
||||
if err != nil {
|
||||
log.Fatal("Failed to parse private key")
|
||||
log.Fatalf("Failed to parse private key: %s", err)
|
||||
}
|
||||
|
||||
sshConfig.AddHostKey(private)
|
||||
app := server.NewServer(*sshConfig)
|
||||
app := server.NewServer(sshConfig)
|
||||
app.Start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user