Mounting an SSH-accessible remote directory automatically is a nifty capability. Here's a nice description of how one can do that - specifically under Ubuntu but it will work the same just fine under most other Linux distributions:
Automatically mounting a remote directory in Ubuntu using autofs + sshfs
One thing not mentioned there - and something I keep forgetting about between the instances I need to recall it - is that the passwordless SSH login will fail unless the user directory on the SSH server is writable by the owner only! So, using the same terms as in the example above one should do the following:
1) Log into example.com as remoteusername
2) Execute the following command:
chmod g-w,o-w ~
Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts
Friday, December 30, 2011
Saturday, April 30, 2011
SFTP vs SSH
One might be inclined to think that they are one and the same, pretty much. Well, not quite.
We had this problem whereby the SSH worked fine but SFTP not at all. See the following desription:
SFTP seems to fail for NIS accounts under OpenSSH 5.x
Well, it ended up being a little different. What most of those NIS-based accounts had in common was a particular customisation in their BASH startup scripts (.bashrc, etc.) One .bashrc was removed the SFTP started working again.
Moral of the story? Whenever anything that could have to do with the login procedure goes wrong it might make sense to just maximally simplify the login procedure - such as remove all customisations, for instance - and try again.
We had this problem whereby the SSH worked fine but SFTP not at all. See the following desription:
SFTP seems to fail for NIS accounts under OpenSSH 5.x
Well, it ended up being a little different. What most of those NIS-based accounts had in common was a particular customisation in their BASH startup scripts (.bashrc, etc.) One .bashrc was removed the SFTP started working again.
Moral of the story? Whenever anything that could have to do with the login procedure goes wrong it might make sense to just maximally simplify the login procedure - such as remove all customisations, for instance - and try again.
Subscribe to:
Posts (Atom)