GCP: Can not ssh to instance after sftp config setting (ForceCommand internal-sftp) [closed]












1














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)



https://i.stack.imgur.com/4SVtp.png
https://i.stack.imgur.com/aBpqM.png










share|improve this question













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.













  • @David meta.superuser.com/questions/11991/…
    – jonsca
    Dec 6 at 23:54
















1














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)



https://i.stack.imgur.com/4SVtp.png
https://i.stack.imgur.com/aBpqM.png










share|improve this question













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.













  • @David meta.superuser.com/questions/11991/…
    – jonsca
    Dec 6 at 23:54














1












1








1







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)



https://i.stack.imgur.com/4SVtp.png
https://i.stack.imgur.com/aBpqM.png










share|improve this question













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)



https://i.stack.imgur.com/4SVtp.png
https://i.stack.imgur.com/aBpqM.png







ssh sftp amazon-ec2 google-cloud-platform






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 6 at 16:11









sngjuk

62




62




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.




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.












  • @David meta.superuser.com/questions/11991/…
    – jonsca
    Dec 6 at 23:54


















  • @David meta.superuser.com/questions/11991/…
    – jonsca
    Dec 6 at 23:54
















@David meta.superuser.com/questions/11991/…
– jonsca
Dec 6 at 23:54




@David meta.superuser.com/questions/11991/…
– jonsca
Dec 6 at 23:54















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

If I really need a card on my start hand, how many mulligans make sense? [duplicate]

Alcedinidae

Can an atomic nucleus contain both particles and antiparticles? [duplicate]