Compare commits

...

2 commits

Author SHA1 Message Date
Russtopia
3325bb3a4e Update 'README.md' adding authtoken setup example 2022-09-26 00:49:52 -07:00
Russ Magee
0913311351 Suppress Gimme Cookie prompt when in gopt (-g) authtoken create mode 2022-09-25 23:23:33 -07:00
2 changed files with 13 additions and 3 deletions

View file

@ -199,6 +199,12 @@ hostname:token string. Place this string into $HOME/.xs_id to allow logins witho
entering a password (obviously, $HOME/.xs_id on both server and client for the user
should *not* be world-readable.)
```
$ xs -g user@host.net >~/.xs_id
```
[enter password blindly, authtoken entry will be stored in ~/.xs_id]
### File Copying using xc
xc is a symlink to xs, and the binary checks its own filename to determine whether

View file

@ -1007,10 +1007,14 @@ func main() { //nolint: funlen, gocyclo
})
if authCookie == "" {
// No auth token, prompt for password
fmt.Printf("Gimme cookie:")
if !gopt {
// No auth token, prompt for password
fmt.Printf("Gimme cookie:")
}
ab, e := xs.ReadPassword(os.Stdin.Fd())
fmt.Printf("\r\n")
if !gopt {
fmt.Printf("\r\n")
}
if e != nil {
panic(e)
}