Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
Anyone here know,how to use sshfs without password. I need a equivalent of ssh -i command...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763

    Thumbs up sshfs passwordless login


    Anyone here know,how to use sshfs without password. I need a equivalent of ssh -i command
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,423
    As sshfs is built upon ssh, I would guess a normal key auth setup should do the trick.
    i.e. if you can login via ssh without password,
    sshfs should behave in the same way.
    You must always face the curtain with a bow.

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    Thanks for your answer.One guy suggested me this
    sshfs -o IdentityFile=~/.ssh/id_rsa


    I'm using machine from amazon ec2.. normally i login using something like
    How to do that with sshfs I tried something like
    sshfs -o IdentityFile= key.file key.pem root@ec2-zzz-xxx-xxx-y.compute.amazonaws.com
    but it gave an error missing host see `sshfs -h' for usage

    Any thoughts
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,423
    Try this:

    sshfs -o ssh_command="ssh -i key.file" root@ec2-zzz-xxx-xxx-y.compute.amazonaws.com

    looks ugly as hell
    Last edited by Irithori; 01-25-2010 at 10:06 AM.
    You must always face the curtain with a bow.

  6. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    I'm getting this error
    read: Connection reset by peer
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  7. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,423
    Actually..

    The usual way of using key auth is:
    Create a ssh key pair on your machine with ssh-keygen
    Then concat the content of your .ssh/id_rsa.pub to .ssh/authorized_keys2 on the remote machine

    Can you try to get a passwordless login via ssh first by using the above?
    You must always face the curtain with a bow.

  8. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    In the mean time,I edited /etc/ssh/config and added alternate IdentityFile
    and now when use ssh i can login without password

    ssh user@xxx.yyy.aws.com

    works
    sshfs -o ssh_command="ssh" root@xx.yy.zz.amazonaws.com:/mnt/ /mnt
    or
    sshfs root@xx.yy.zz.amazonaws.com:/mnt /mnt

    both gives
    read: Connection reset by peer
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  9. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    using running sshfs in verbose mode it says
    subsystem request failed on channel 0
    read: Connection reset by peer
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  10. #9
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    I found this sloution
    Sshfs - DD-WRT Wiki

    But it didn't work.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  11. #10
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,423
    Are you sure, the remote ssh server offers sftp?
    You must always face the curtain with a bow.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •