LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-14-2008, 10:48 AM   #1
Sambatyon
LQ Newbie
 
Registered: Jul 2005
Distribution: Kubuntu
Posts: 5

Rep: Reputation: 0
problem doing sshfs mount with public key authentication


Hi,

I'm having trouble mounting over sshfs with public key authentication instead of password authentication (need this to do an automount).

I managed to get ordinary ssh logins to not require a password:

sambatyon@machina ~ $ ssh sambatyon@filer
sambatyon@filer ~ $

However, when I try mounting with sshfs I get the following:

sambatyon@machina ~ $ sudo sshfs sambatyon@filer:/shares/internal/backup /mnt/backup -o PasswordAuthentication=no
read: Connection reset by peer

I ran strace and got the following (relevant text only):

socketpair(PF_FILE, SOCK_STREAM, 0, [3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7d766f8) = 10137
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(10137, NULL, 0) = 10137
close(4) = 0
writev(3, [{"\0\0\0\5\1\0\0\0\3", 9}], 1) = 9
read(3, 0x80540d0, 9) = -1 ECONNRESET (Connection reset by peer)
dup(2) = 4
fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(4, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 3), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fcc000
_llseek(4, 0, 0xbfcce6b8, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(4, "read: Connection reset by peer\n", 31read: Connection reset by peer
) = 31
close(4) = 0
munmap(0xb7fcc000, 4096) = 0
exit_group(1) = ?
Process 10136 detached


Any ideas?
 
Old 06-15-2008, 07:30 AM   #2
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
I suspect that since you run the command with sudo it inherits some of sudo properties.
Run the sshfs sambatyon@filer:/shares/internal/backup /mnt/backup without "sudo"

The easier way would be to add the user sambatyon to group "fuse". You can then execute the command without sudo.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh public key authentication problem flgal3 Linux - Software 21 02-06-2009 11:15 AM
Public key authentication with ssh elnacho12 Linux - Networking 3 12-18-2007 08:38 AM
Public Key Authentication with SSH edafe Ubuntu 1 08-26-2006 11:06 AM
SSH - Problem with Public Key Authentication HaPagan Linux - Security 5 11-28-2005 11:27 PM
Public key authentication problem Gameon Linux - Security 7 01-02-2004 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration