url scheme for ssh: Calling command on remote host

2019-07-09 08:01发布

问题:

Is there an url scheme for calling a command on a remote host via ssh?

In my use case I want to call this:

psql -c "select * from my_table order by id;"

There seams to be a RFC for the connection paramters. Example: from https://tools.ietf.org/id/draft-salowey-secsh-uri-00.html#anchor8

ssh://user@host.example.com

... But how to encode the above psql command into an url?

回答1:

There seams to be a RFC for the connection paramters. Example: from https://tools.ietf.org/id/draft-salowey-secsh-uri-00.html#anchor8

It is not RFC, but an expired draft quite not used by anyone (maybe cisco who created it is using it?).

It is not generally possible.