Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu add proxy user for ssh proxy. #12

Open
wenzhixin opened this issue Sep 17, 2015 · 0 comments
Open

Ubuntu add proxy user for ssh proxy. #12

wenzhixin opened this issue Sep 17, 2015 · 0 comments

Comments

@wenzhixin
Copy link
Owner

Server side

  • Add proxy user:
sudo useradd -m proxy
  • Create an id_rsa key, will create id_rsa and id_rsa.pub files:
ssh-keygen
  • Add authorized_keys:
sudo mkdir /home/proxy/.ssh
sudo cp id_rsa.pub /home/proxy/.ssh/authorized_keys
sudo chown -R proxy.proxy /home/proxy/.ssh
  • Disable the login of proxy user:
sudo vi /etc/passwd

Add /bin/false to proxy line:

proxy:x:1002:1002::/home/proxy:/bin/false

Client side

  • Add config:
host proxy 
    HostName server_ip
    User proxy
    IdentityFile ~/.ssh/proxy/id_rsa
  • Test config:
ssh proxy

and it will return Connection to server_ip closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant