After I added following lines to the /etc/ssh/sshd_config for sftp setup as online guide suggested.

Match group sftp
ChrootDirectory /home
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

I can not open ssh to instance with "This service allows sftp connections only" message.
I guess ForceCommand internal-sftp limits ssh connection, but as I can't access to instance via ssh but only sftp. I don't know how to figure re-configure sshd.
It's dummy that I blocked myself.. but is there way to fix this problem without lossing instance data? Any help will be highly appreciated. (Pics are captured from my gcp-cloudshell)

closed as off-topic by DavidPostill Dec 6 at 20:57

  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.