Hide arguments from ps [closed]

2019-04-26 12:24发布

I would like to keep my ssh command hidden/disguised from other users.

Example:

ssh user@host -i /my/private/key

Unfortunately this will come up in the ps listing and other users will be able to see the private key file that I am using. Is there a way around this?

(They are logged in as the same user as I am)

7条回答
放荡不羁爱自由
2楼-- · 2019-04-26 12:47

You can setup your private key via your ~/.ssh/config file which is secured by 0700. Here is example of ~/.ssh/config:

Host myhost.com
  IdentityFile /home/maxcohan/.ssh/github.com.id_rsa
查看更多
登录 后发表回答