Print proper filename in fatal log message
This commit is contained in:
parent
358496322a
commit
82580692ce
1 changed files with 1 additions and 1 deletions
2
sshd.go
2
sshd.go
|
@ -365,7 +365,7 @@ func serve(cssh ssh.Channel, conn net.Conn, client *sshClient) {
|
||||||
func loadHostKeys(config *ssh.ServerConfig) {
|
func loadHostKeys(config *ssh.ServerConfig) {
|
||||||
privateBytes, err := ioutil.ReadFile(*hostkey)
|
privateBytes, err := ioutil.ReadFile(*hostkey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Failed to load private key (./id_rsa)")
|
log.Fatal(fmt.Sprintf("Failed to load private key (%s)", *hostkey))
|
||||||
}
|
}
|
||||||
|
|
||||||
private, err := ssh.ParsePrivateKey(privateBytes)
|
private, err := ssh.ParsePrivateKey(privateBytes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue