Skip to content

Instantly share code, notes, and snippets.

@sxhmilyoyo
Last active January 28, 2019 18:42
Show Gist options
  • Save sxhmilyoyo/0f442de2521be8cb92b4005ca76c8fdf to your computer and use it in GitHub Desktop.
Save sxhmilyoyo/0f442de2521be8cb92b4005ca76c8fdf to your computer and use it in GitHub Desktop.
  1. login server
  • ssh username@@montana.dataapplab.com -p 49233
  • mkdir .ssh
  1. on your computer, open terminal
  • check the ~/.ssh exists, if not mkdir ~/.ssh
  • generate ssh keys: ssh-keygen -t rsa -f ~/.ssh/id_rsa.dal
  • edit config vim .ssh/.config, type:
    Host dal
    User bhdshaox
    HostName montana.dataapplab.com
    Port 49233
    IdentityFile ~/.ssh/id_rsa.dal
    ForwardX11 yes
    ForwardX11Trusted yes
  • append public key to the .ssh/authorized_keys: ssh username@@montana.dataapplab.com "echo \"`cat ~/.ssh/id_rsa.dal.pub`\" >> .ssh/authorized_keys"
  1. on your machine terminal, directly enter ssh dal to login the server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment