Changing user in .bashrc breaks SFTP

خرید بک لینک

In my leaing track for Amazon EC2, I thought it would be a great idea to just always become the root user while still logging in. I added this line to my .bashrc

/usr/bin/sudo /bin/bash

That way, I would not have to SSH in as the root user, but I would be automatically switched when I log in. However, when this was in the .bashrc, it broke any SFTP client that tried to connect. The errors varied depending on the client used, but usually they all ended up with a timeout, even though they successfully connected to the remote host. WinSCP suggested that an SFTP server might not be running on the host.

I am now fully aware that adding that line was a bad move, but I don't know why this breaks SFTP. I'm logging in as ec2-user, but becoming root (I think), yet I can't understand why this causes a problem.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 432 تاريخ: جمعه 29 مرداد 1395 ساعت: 2:59

صفحه بندی