Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ferama committed Aug 4, 2021
1 parent de6e96e commit c346d81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ It's meant to make ssh tunnels fun and understendable again
I wanted an easy to use and reliable ssh tunnel tool. The available alternatives don't fully satisfy me and don't support all the features I need (as the embedded sshd server for example, or an out of the box connection monitoring mechanism) so I wrote my own

## Quick command line usage
Keep in mind that rospo only supports keys based auth, so you always need to be sure that *identity*, *authorized_keys* etc are always correctly setup.

Usage example:

Starts an embedded ssh server and reverse proxy the port to remote_server
Expand Down
10 changes: 2 additions & 8 deletions pkg/sshd/session_chan_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,12 @@ func sessionClientServe(channel ssh.Channel, pty rpty.Pty) {

// Pipe session to shell and vice-versa
go func() {
_, err := pty.WriteTo(channel)
if err != nil {
log.Println(fmt.Sprintf("error while copy from channel: %s", err))
}
pty.WriteTo(channel)
once.Do(close)
}()

go func() {
_, err := pty.ReadFrom(channel)
if err != nil {
log.Println(fmt.Sprintf("error while copy to channel: %s", err))
}
pty.ReadFrom(channel)
once.Do(close)
}()
}

0 comments on commit c346d81

Please sign in to comment.