Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feature: Ability to login as one user and run all tasks as another

Open
#262 21 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
devops

Research direction

Start by reviewing the linked sshkit-backends-netssh_global backend and comparing its approach with the existing SSHKit test suite, whose style and methodology the issue says it follows. Done means core SSHKit can support logging in as one user while running commands as another, with the described global options, without reimplementing existing Capistrano tasks.

Written by the indexing model from the issue text.

Description

enhancement need more info

We've created a backend that allows Capistrano 3 to work with setups that require users to login in as user A, but run all commands as user B.

The backend essentially sets a global owner and all tasks (unless explicitly overridden) will run as this user. There are a few other options that can also be globally configured (this helps get around certain use cases) such as directory and the ability to forward an SSH agent to the owner for certain commands. This means the existing Capistrano tasks do not need to be reimplemented (instead the backend is switched).

While this kind of server setup is not recommended or ideal, when coming across one it's still useful to be able to use Capistrano to deploy.

The code is pretty ugly at the moment, subclassing and overriding a lot of private methods. However, if core sshkit are interested this could easily be cleaned up. The test suite style and methodology has been retained to try and make it as easy as possible to merge into core sshkit.

Does this look like a feature that you would be interested in merging into core? If so I can raise a PR.

Dominant language
Ruby
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from capistrano/sshkit

All issues in capistrano/sshkit

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.