> Authentication refused: bad ownership or modes for file > /home/A/glassfish/domains/domain1/config/authorized_keys This tells you the problem. Every single folder in that path must not have world or group write permission.