Skip to content

genki/rosh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rosh

Rosh is roaming shell. It can automatically reconnect to the host with the remote tmux or GNU screen session.

Installation

Add this line to your application's Gemfile:

gem 'rosh'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rosh

Usage

rosh [options] hostname [session_name]

-a alive-interval   Set ssh option ServerAliveInterval. Default: 5
-e escape           Set the escape charactor of the outer screen session.
                    Default: "^t"
-I interval         Reconnection interval.
-S                  Use GNU screen instead of tmux
-L socket-name      Specify tmux socket name (tmux -L socket-name)

If ~/.ssh/config contains LocalForward or RemoteForward for the host, the same forwarding options are passed to ssh automatically.

If the host uses ProxyJump or ProxyCommand, rosh also carries that proxy setting over to the spawned ssh command.

If a LocalForward is skipped because the local port is actually in use, rosh retries that forwarding on later reconnect attempts instead of dropping it for the rest of the process lifetime.

To detach the outer screen session,

^t d

To send the command to the inner screen session,

^a

Currently it is not configurable, but the source code is very simple to be customizable.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Rosh is roaming shell. It can automatically reconnect to the host with the remote GNU screen session.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors