GCE Remote development via VSCode SSH - MRLIVING/Becca GitHub Wiki
TOC
Overview
Server SSH key generate & setup
ssh-keygen
-
ssh-keygen -t rsa -f ~/.ssh/[KEY_FILENAME] -C [USERNAME]
, e.g.,ssh-keygen -t rsa -f ~/.ssh/becca-ssh-key -C becca
,
and the command will generate 2 keysunder ${USER_HOME}/.ssh/
becca-ssh-key
becca-ssh-key.pub
setup the Public key into the GCE via web console
Client Installation (VSCode in Windows)
Install OpenSSH
Visual Studio Code
Download and install- Extension Pack Remote Development
Setup remote connection and private key
-
create
~/.ssh/config
, -
update
~/.ssh/config
, see SSH configuration file, notice code the config file manually instead of copy/past the content -
Connect to the remote server
-
Open a remote folder
-
Open a terminal for remote CLI mode
-
Close the remote connection
Git Commit as a different user
- see Here