ssh failure: can't ssh out as user, but root works
cb at lim.nl
Tue Jan 30 01:21:33 UTC 2007
On 1/29/07, Matt Price <matt.price at utoronto.ca> wrote:
> The same command also hangs if I sudo -s, but if I instead try
> su - root, all of a sudden ssh works again. THis is very odd.
Actually, it isn't so odd. su and sudo use different environments.
AFAIK, sudo executes a command with root privileges within the current
environment, while su puts you into the root environment. In your
case, your user and root accounts apparently have different ssh
settings, hence you get different results.
When it works, it just works, but when it doesn't, ssh is notoriously
difficult to debug. Double-check the permissions for ~/.ssh. Group and
Other should not have read permission. If that doesn't help I would
recreate the authorized_keys file.
More information about the ubuntu-users