I've tried different ways and read some solutions including these:
Why I am not able to ssh as root?
Editing with Winscp
And an article from Forum of Ubuntu
I don't understand why when I connect with
ubuntu
via PuTTY, I can have root permission and modify files. However, when I connect withubuntu
via WinSCP, I'm another user (I used the same username and same private key(pem) on both connecting software) and can't modify files.Then I found some possible solutions from the links above. I tried to set
root
password andpermitRootLogin
. But then, when I log in with theroot
username, it says:Received too large(1349281121 B) SFTP packet. Max supported packet size is 1024000B. The error is typically casued 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?
whereas when I changed the username back to
ubuntu
, then it works(but I can't modify files when I'm notroot
user).
I am very confused, please anybody if you can point me out, I'd be much appreciated.