Change SSH user of a web hosting package

Change keys, shell, disk space, status, end or description of one SSH user.

WWriteIdempotentbetaNeeds service_webhosting
Tool
manitu_webhosting_web_sshuser_seton https://mcp.manitu.de/mcp
POST
/v1/webhosting/web/sshuser/seton https://api.manitu.de
Try it
Changes the account. Agents say what will happen and wait for an explicit yes before calling it.
readOnlyHint falsedestructiveHint falseidempotentHint trueopenWorldHint false

Changes an SSH user of a web hosting package of the manitu customer account this connection works in, by site_id and username from manitu_webhosting_web_sshuser_list. Only the fields given change. Keys: ssh_key_list REPLACES all keys - to add one, read the keys with manitu_webhosting_web_sshuser_get and send the old ones plus the new one; or ssh_keys_same_as copies another SSH user's keys. If the customer wrote lines on the server that would be lost (options like command= or from=), the call is refused with the conflict ssh_keys_would_be_lost and those lines - tell the customer, and only with his yes send it again with replace_all true. status inactive switches it off without deleting it and ends its open sessions; expires_at null removes the end. Refused with a conflict when the package cannot be changed now (not_configurable). Tell the customer what will change and ask for an explicit yes first.

site_idinteger | stringrequired

The site_id from manitu_webhosting_list - never guess one.

pattern ^[1-9][0-9]*$min 1
usernamestringrequired

The user name of the SSH user (ssh<number>) from manitu_webhosting_web_sshuser_list - never guess one.

max length 32pattern ^ssh[0-9]+$
quota_mbinteger | null

Disk space in MB the files it owns may take, at most the package's; null or 0: no limit of its own.

min 0
statusstring

active, or inactive to switch it off without deleting it. Default when created: active.

One of active inactive
expires_atstring | null

When the SSH user expires - it works up to the next midnight (Europe/Berlin) at or after the moment given, which the answer shows. Not in the past. From this moment on it can no longer be used (the moment itself is excluded); null: without end.

Format date-time
descriptionstring | null

The customer's description, for his own overview - e.g. who uses it. Left out: unchanged (set) or none (create); null or empty: none.

max length 1024
ssh_key_listarray of string

The public keys that may log in as this SSH user - all of them: the list replaces the keys it has. Only one of ssh_key_list, ssh_keys_same_as. Each one public key, one line as in authorized_keys: "ssh-ed25519 AAAA... comment" (also ecdsa-sha2-nistp256/384/521, ssh-rsa from 2048 bits). No options in front of the key (command=, environment=, from= ...), no DSA. The public key only - never a private key.

min items 1max items 50
ssh_keys_same_asstring

The user name of the SSH user (ssh<number>) from manitu_webhosting_web_sshuser_list - never guess one.

max length 32pattern ^ssh[0-9]+$
shellstring

bash (default when created), zsh, or git - git-shell: only git push/pull, no commands.

One of bash zsh git
replace_allboolean

true: replace the keys even if lines the customer wrote on the server are lost (after ssh_keys_would_be_lost, with the customer's yes). Default false.

usernamestringrequired

The user name to log in with (ssh<number>) - what the other SSH user tools take.

descriptionstring | nullrequired

What the customer wrote about it (his description), null if nothing - not its name or user name.

statusstringrequired

active, or inactive (switched off by the customer, kept for later).

One of active inactive
is_usable_nowbooleanrequired

It can log in right now: active and not expired.

expires_atstring | nullrequired

When the SSH user expires. From this moment on it can no longer be used (the moment itself is excluded); null: without end.

Format date-time
shellstring | nullrequired

The shell: bash, zsh, or git (git only - for pushing and pulling repositories).

One of bash zsh git null
quota_mbinteger | nullrequired

Disk space in MB the files it owns may take; null: no limit of its own (the package's applies).

created_atstring | nullrequired

When it was created.

Format date-time
last_login_atstring | nullrequired

Its last login, null if never.

Format date-time
ssh_key_listarray of object | nullrequired

The public keys that may log in, read live from the server (the customer may change them there himself); null if the file could not be read.

ssh_key_list[].linestringrequired

The line as it is in the file - a public key, no secret.

ssh_key_list[].algorithmstring | nullrequired

e.g. ssh-ed25519; null if the line is no key.

ssh_key_list[].commentstring | nullrequired

The comment after the key - often who it belongs to.

ssh_key_list[].fingerprint_sha256string | nullrequired

As "ssh-keygen -lf" shows it, e.g. "SHA256:...".

ssh_key_list[].has_optionsbooleanrequired

Options in front of the key (command=, from= ...) - written by the customer on the server.

ssh_key_list[].is_validbooleanrequired

A line manitu would write itself; false: kept only as long as the file is not replaced.

connectionobjectrequired
connection.hoststring | nullrequired

The host to connect to - the web server of the package.

connection.usernamestringrequired

The user name to log in with.

connection.method_listarray of objectrequired

The ways to connect: SSH on port 22.

connection.method_list[].protocolstringrequired
One of ssh
connection.method_list[].portintegerrequired
connection.method_list[].is_encryptedbooleanrequired
connection.method_list[].is_recommendedbooleanrequired
connection.authstringrequired

public_key_only: log in with a key from the user's ssh_key_list - a password does not work.

One of public_key_only
connection.host_key_listarray of objectrequired

The server's host keys - on the first connection the SSH client shows one of these fingerprints; it must match.

connection.host_key_list[].algorithmstringrequired
connection.host_key_list[].fingerprint_sha256stringrequired

As the SSH client shows it, e.g. "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8".

One of X-API-Key, Authorization: Bearer … - never more than one in a request. More

site_idinteger | stringrequired

The site_id from manitu_webhosting_list - never guess one.

pattern ^[1-9][0-9]*$min 1
usernamestringrequired

The user name of the SSH user (ssh<number>) from manitu_webhosting_web_sshuser_list - never guess one.

max length 32pattern ^ssh[0-9]+$
quota_mbinteger | null

Disk space in MB the files it owns may take, at most the package's; null or 0: no limit of its own.

min 0
statusstring

active, or inactive to switch it off without deleting it. Default when created: active.

One of active inactive
expires_atstring | null

When the SSH user expires - it works up to the next midnight (Europe/Berlin) at or after the moment given, which the answer shows. Not in the past. From this moment on it can no longer be used (the moment itself is excluded); null: without end.

Format date-time
descriptionstring | null

The customer's description, for his own overview - e.g. who uses it. Left out: unchanged (set) or none (create); null or empty: none.

max length 1024
ssh_key_listarray of string

The public keys that may log in as this SSH user - all of them: the list replaces the keys it has. Only one of ssh_key_list, ssh_keys_same_as. Each one public key, one line as in authorized_keys: "ssh-ed25519 AAAA... comment" (also ecdsa-sha2-nistp256/384/521, ssh-rsa from 2048 bits). No options in front of the key (command=, environment=, from= ...), no DSA. The public key only - never a private key.

min items 1max items 50
ssh_keys_same_asstring

The user name of the SSH user (ssh<number>) from manitu_webhosting_web_sshuser_list - never guess one.

max length 32pattern ^ssh[0-9]+$
shellstring

bash (default when created), zsh, or git - git-shell: only git push/pull, no commands.

One of bash zsh git
replace_allboolean

true: replace the keys even if lines the customer wrote on the server are lost (after ssh_keys_would_be_lost, with the customer's yes). Default false.

usernamestringrequired

The user name to log in with (ssh<number>) - what the other SSH user tools take.

descriptionstring | nullrequired

What the customer wrote about it (his description), null if nothing - not its name or user name.

statusstringrequired

active, or inactive (switched off by the customer, kept for later).

One of active inactive
is_usable_nowbooleanrequired

It can log in right now: active and not expired.

expires_atstring | nullrequired

When the SSH user expires. From this moment on it can no longer be used (the moment itself is excluded); null: without end.

Format date-time
shellstring | nullrequired

The shell: bash, zsh, or git (git only - for pushing and pulling repositories).

One of bash zsh git null
quota_mbinteger | nullrequired

Disk space in MB the files it owns may take; null: no limit of its own (the package's applies).

created_atstring | nullrequired

When it was created.

Format date-time
last_login_atstring | nullrequired

Its last login, null if never.

Format date-time
ssh_key_listarray of object | nullrequired

The public keys that may log in, read live from the server (the customer may change them there himself); null if the file could not be read.

ssh_key_list[].linestringrequired

The line as it is in the file - a public key, no secret.

ssh_key_list[].algorithmstring | nullrequired

e.g. ssh-ed25519; null if the line is no key.

ssh_key_list[].commentstring | nullrequired

The comment after the key - often who it belongs to.

ssh_key_list[].fingerprint_sha256string | nullrequired

As "ssh-keygen -lf" shows it, e.g. "SHA256:...".

ssh_key_list[].has_optionsbooleanrequired

Options in front of the key (command=, from= ...) - written by the customer on the server.

ssh_key_list[].is_validbooleanrequired

A line manitu would write itself; false: kept only as long as the file is not replaced.

connectionobjectrequired
connection.hoststring | nullrequired

The host to connect to - the web server of the package.

connection.usernamestringrequired

The user name to log in with.

connection.method_listarray of objectrequired

The ways to connect: SSH on port 22.

connection.method_list[].protocolstringrequired
One of ssh
connection.method_list[].portintegerrequired
connection.method_list[].is_encryptedbooleanrequired
connection.method_list[].is_recommendedbooleanrequired
connection.authstringrequired

public_key_only: log in with a key from the user's ssh_key_list - a password does not work.

One of public_key_only
connection.host_key_listarray of objectrequired

The server's host keys - on the first connection the SSH client shows one of these fingerprints; it must match.

connection.host_key_list[].algorithmstringrequired
connection.host_key_list[].fingerprint_sha256stringrequired

As the SSH client shows it, e.g. "SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8".

200Success.400The request does not match the declared input schema.401No credential was presented, or it was not recognised.403The credential is not permitted to use this operation.500The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.503The channel this operation forwards through is unavailable.