ssh_sudo_write

Community

Securely write files under sudo on a remote host with control and preservation of file attributes.

AuthorNightreaver
Version1.0.0
Installs0

System Documentation

What problem does it solve?

The Skill overcomes the challenge of safely executing file write operations with elevated privileges (sudo) on remote SSH hosts, while maintaining file ownership and permissions.

Core Features & Use Cases

  • Atomic Write with Sudo: Safely writes files under sudo without leaving sensitive content in memory.
  • Ownership Preservation: Ensures file ownership matches existing or specified values after write.
  • Permission Bit Setting: Allows the setting of specific file permissions using octal mode values.
  • Use Case: If you need to modify or create a critical configuration file on a remote server that requires sudo permissions and must be owned by a specific user or group.

Quick Start

Execute ssh_sudo_write(host="prod-server", path="/etc/app/redis.conf", content_text="maxmemory=256m", chown_user="app", chown_group="app", mode=0o640) to securely update a configuration file under sudo while maintaining proper ownership.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ssh_sudo_write
Download link: https://github.com/Nightreaver/python-ssh-mcp/archive/main.zip#ssh-sudo-write

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.