A
A
accountnujen2021-08-28 17:13:09
ubuntu
accountnujen, 2021-08-28 17:13:09

How to connect to sftp without private key?

Hello. I took a free server on Oracle (I heard about the consequences, but not about that now). I'm not familiar with Linux at all, so I need your help.

I put Ubuntu there. I was given two files private key and public key. By some miracle, I managed to connect via Putty via ssh (I had sex with the private key for a very long time). I connect through the Ubuntu user (this is the default user that is issued by Oracle).

Now the question is:
1. how to give the ubuntu user write access to the entire directory? i did usermod -aG sudo ubuntu, but still can't write anything via sftp: "Error: /var/bckp/33: open for write: permission denied"
2. disabled authorization via private key using this link

nano /etc/ssh/sshd_config
PubkeyAuthentication no
#PasswordAuthentication no

Ubuntu began to connect without a private key, but root does not want to. I set the root password via passwd.
Here is what filezilla says
Статус:	Using username "root". 
Статус:	Access denied 
Ошибка:	Сбой аутентификации.
Ошибка:	Критическая ошибка: Невозможно подключиться к серверу

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Drno, 2021-08-28
@Drno

In order for you to be able to log in via ssh as root, you need to allow this in the same config file.
PermitRootLogin
yes

B
Boris Syomov, 2021-08-28
@kotomyava

Most likely, you do not need to connect via sftp as root.
Working with files of some application is usually carried out from an unprivileged user, and you can edit configs from root directly in the console.
Sudo only works in the console, it has nothing to do with sftp.
If for some strange reason you need to sftp as root, you need to add the public part of the key to /root/.ssh/authorized_keys and use its private part for authorization. You can use the same key as for the user.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question