Hi I can login to the GCE VM with WinSCP using my own username, cannot login as root...this is by default according to Google, and can be changed.
Changed like this:
Step 1: Login SSH and Su Root
# sudo su root
Step 2: Change password Root
#passwd root
Step 3: Config SSHD allow Root login
#nano /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
#service sshd restart (I used ssh as I'm using ubuntu and sshd wouldn't work)
Tried to login as root via WinSCP but I get
"Received too large (1349281121 B) SFTP packet. Max supported packet size is 1024000 B. The error is typically caused by message printed from startup script (like .profile). The message may start with 'Plea'." Cannot initialize SFTP protocol. Is the host running a SFTP server?"
Any ideas?
Received too large SFTP packet. Max supported packet size is 102400 B
Cause: This problem can arise when your .bashrc file is printing data to the screen (e.g.archey, screenfetch). The .bashrc file runs every time any console shell is initialized.
Solution: Simply move any scripts that generate output from your .bashrc file to your .bash_profile. The .bash_profile only runs when you create a physical shell session.
NOTE: Just for anyone who comes across this and simply wants to copy files and doesn't matter what file protocol they use. You can just switch file protocol from SFTP to SCP to avoid this issue. Thought it might be worth a mention.
If you used Ubuntu linux and try to connect the server then "Please login as the Ubuntu user" you should sftp as the ubuntu user, not as root.
Try that, hope it will work for you!
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With