Skip to content

Instantly share code, notes, and snippets.

@vorobeij
Created October 29, 2018 19:49
Show Gist options
  • Save vorobeij/178ad7812f0108705dbbd6fa8d071a73 to your computer and use it in GitHub Desktop.
Save vorobeij/178ad7812f0108705dbbd6fa8d071a73 to your computer and use it in GitHub Desktop.
mainframer setup
# create user on remote machine
scp remote_machine_setup.sh root@remote-machine:~/
ssh remoteMachine
sudo bash remote_machine_setup.sh sj_1 "new_user_ssh_public_key"
# From local machine
# sj_1@192.168.1.104 - remote machine
# press enters
ssh-keygen -t rsa
ssh sj_1@192.168.1.104 mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh sj_1@192.168.1.104 'cat >> .ssh/authorized_keys'
ssh sj_1@192.168.1.104 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
ssh sj_1@192.168.1.104
# https://github.com/buildfoundation/mainframer/tree/3.x/samples/gradle-android
# https://www.youtube.com/watch?v=xysQXMaPaGw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment