Permission denied (publickey). Couldn't read packet: Connection reset by peer - amazon-ec2

hi im configuring ftp on amazon Ec2 micro linux instance but i found error
Permission denied (publickey). Couldn't read packet: Connection reset by peer
i have install vsftpd on my instance,configure fire wall open port 21, 2020 edit vsftpd.conf
enabled anonymous login = false
add user to my instance,when i login with my user above error occur,
help me what im doing wrong and where is the problem, why this error occurs.thank in advance.

I had a similar problem, if I remember rightly I solved it by changing from passive to active mode.

Make sure the folder you're connecting to is owned by root and no other user/group has write priveleges:
sudo chown root:root /home/ftpuser/
sudo chmod 755 /home/ftpuser/
You can debug connection errors by using
sftp -vvv ftpuser#12.34.56.78

Related

Permission denied (publickey,gssapi-keyex,gssapi-with-mic) on Mac

I want to connect from my Mac (terminal) to GCP instance (centos) by running ssh -i new_ssh_key centos#0.0.0.0
and I got the error centos#0.0.0.0: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
All works well till yesterday when SCP command did not worked out so I changed the permissions and probably something went wrong and now I can not connect to centos server at all.
Appreciated any help on this.
I fixed with adding below lines in /etc/ssh/ssh_config
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
As shown:

Ping-Connection-Pool throws Access Denied to DB although user exist and credentials are OK

I'm trying to create a jdbc-connection-pool using payara on the console. Using ./asadmin on Payara_Server/bin/
It is Running on Linux and the credentials for the database are user=jc and password=hola123 (dummies), It is for sure this credentials work. I tried them on Mariadb.
I create a connection pool using ./asadmin on Payara, it looks like this:
./asadmin create-jdbc-connection-pool --datasourceclassname org.mariadb.jdbc.MariaDbDataSource
--restype javax.sql.DataSource --property user=jc:password=hola123:DatabaseName=​cinev2:ServerName=localhost:port=3306 cinePool
Now, when I try:
./asadmin ping-connection-pool
I get an error like this:
remote failure: Ping Connection Pool failed for cinePool.
Connection could not be allocated because:
Access denied for user 'jc'#'localhost' to database '​cinev2' Please check the server.log for more details.
Command ping-connection-pool failed.
What would be the causes of this Issue other than Credentials? I have checked if the credentials are right and they are, So I've no clue on the issue.
Since it works when locally connecting to the DB it probably really is an access issue.
Please check if you did all steps outlined here: Access denied for user 'root'#'localhost' (using password: YES) after new installation on Ubuntu

unable to access aws instance through ssh

Whenever I try to access AWS instance by using ssh I the following error:
Connection blocked because server only allows public key authentication. Please contact your network administrator.
Connection to ec2-54-214-97-39.us-west-2.compute.amazonaws.com closed by remote
host.
Connection to ec2-54-214-97-39.us-west-2.compute.amazonaws.com
closed.
I am accessing by ssh enabled command prompt:
chmod 400 virtue.pem
ssh -i "file.pem" ubuntu#ec2-publicIp.us-west-2.compute.amazonaws.com
I am unable to access aws instance vitual machine .
The error is like the one mentioned here:
https://laracasts.com/discuss/channels/servers/ssh-key-no-longer-working
You need confirm that file.pem is the correct key to access to the instances, and use chmod 400 to give permissions to the .pem in your computer. you can view the logs in the AWS console to verify if there is any message about ssh access.
You can launch other instance with other .pem or detach root volume and attach to other instance to validate the config files
This may be a problem caused by (man-in-the-middle attack).
Change your network to a private one and retry!

The stream or file "storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

Please Help. My linux centos server got shutdown and after the server has started laravel give and error :
The stream or file "storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
I have give the permision to logs folder
chmod 777 -R logs.
but the error Remain.
Thank you so much for any help.
Best Regards,
Dian
I have my solution, after googling
This is what I done
cd /var/www/html
setenforce 0
service httpd restart
Regards,
Dian

Confirm host fails for Single node Cluster while setting up cluster on Ambari

I am trying to setup Ambari on single node cluster.
Ambari setup was done as root user
I tried all the post related to this , change the permission and did set up as permission
http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.1/bk_Installing_HDP_AMB/content/_set_up_password-less_ssh.html
cd ~/.ssh
rm -rf /root/.ssh
ssh-keygen -t dsa
cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
cat /root/.ssh/authorized_keys
Copied the the Key from above line in Ambari while setting up cluster Step
ambari-server restart
When I try to Register and Confirm in lInstall Options I get below error
However I am able to do "ssh root#hadoop.maxsjohn.com without giving the password.
==========================
Creating target directory...
==========================
Command start time 2017-03-13 03:35:43
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
SSH command execution finished
host=hadoop.maxsjohn.com, exitcode=255
Command end time 2017-03-13 03:35:43
ERROR: Bootstrap of host hadoop.maxsjohn.com fails because previous action finished with non-zero exit code (255)
ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
STDOUT:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).[Error Message][1]
So, coming in a year later I got a very similar error but with a multiple host cluster. In case it helps, I found this error happens for the host running Ambari Server when the private key file chosen on the 'Install Options' page in the 'Cluster Install Wizard' is incorrect (in my case I re-created the keys but neglected to update Ambari). From the host OS perspective the passwordless SSH works just fine but Ambari fails to install the host until the corresponding SSH Private Key file is chosen.
I suspect the password cannot be blank. You need to set a password. If this is for your learning, i would suggest take a copy of VM from hortonworks site and use it. You don't have to go through the pain of installing and configuring. Here is the link

Resources