Can not connect through sshfs because a wrong configuration at ~/.ssh/config file

ReynierPM

I am logged in in my local PC (Fedora 24) as rperez. From this PC I needed to connect to a remote server through sshfs so I generated a private/public key by running ssh-keygen. Using the following command I am able to connect to the server without any problem:

sshfs rperez@server_ip:/home/rperez -p 2051 ~/dev -o auto_cache,reconnect

Now I have two Github account: one to be used from work, one to be used from home for personal projects. I would like to connect to both using SSH so I have setup the first one using the generated key for rperez and again that works fine.

I am trying to setup the second one (the personal) on the same PC so I did run this command:

ssh-keygen -t rsa -C "[email protected]" 

I have created the file ~/.ssh/config with the following content:

#rperez account
Host github.com-rperez
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa

#reypm account
Host github.com-reypm
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_reynierpm

#Server
Host <server_ip>
    IdentityFile ~/.ssh/id_dsa

And this is where my problem started. Now running the following commands:

sshfs rperez@server_ip:/home/rperez -p 2051 ~/dev -o auto_cache,reconnect
sshfs rperez@server_ip:/home/rperez -p 2051 ~/dev -o auto_cache,reconnect,IdentityFile=~/.ssh/id_rsa

Return this error:

read: Connection reset by peer

I should add, regardless the current problem, that I am not able to connect either to any Github repository

What is wrong with this configuration?

I have take some ideas from here but none is working for me. Also I am started from this guide for setup the Github accounts

Update: verbose output

ssh -vvv -p 2051 rperez@server_ip
OpenSSH_7.2p2, OpenSSL 1.0.2h-fips  3 May 2016
Bad owner or permissions on /home/rperez/.ssh/config
Jakuje

Running the ssh in debug mode usually uncovers various problems. Usually permissions. In this case

Bad owner or permissions on /home/rperez/.ssh/config

means that the configuration file can not be writeable by others and therefore

chmod go-w /home/rperez/.ssh/config

should fix the problem for you.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

IIS Express - 500.19 Cannot read configuration file - because it's looking at the wrong path

From Dev

Mounting a remote file system (sshfs) through an intermediate machine

From Dev

cmake can't find boost libraries because it looks for the wrong file names

From Dev

cmake can't find boost libraries because it looks for the wrong file names

From Dev

How can I view all the folders currently mounted through sshfs?

From Dev

I can't use the shutdown command because the system "Failes to Connect to bus: No such file or directory"

From Dev

Wrong permissions on configuration file of phpmyadmin

From Dev

Cannot connect to wifi, but can connect through wire

From Dev

SSHFS/SFTP : Vim hangs when trying to edit file over sshfs and can't upload file over MTU size over sftp

From Dev

How to Change /var/ File Permission When I Can't Connect to the server through Filezilla or Putty

From Dev

Cannot Read Configuration File Because it Exceeds the Maximum File Size

From Dev

Connect to remote socket via sshfs

From Dev

Sshfs as regular user through fstab

From Dev

Freepbx can't connect to asterisk wrong password

From Dev

win-sshfs "Server HMAC algorithms not found" Can't connect to server

From Dev

sshfs - No such file or directory

From Dev

sshfs 'no such file' error

From Dev

What's wrong with this configuration of sudoers file?

From Dev

Web configuration file being accessed in the wrong folder

From Dev

Puma server receiving a connection refused because it cannot connect to the socket file

From Dev

DACPAC won't deploy because 'can't connect to server'?

From Dev

Can't Connect to Elasticsearch (through Curl)

From Dev

Can't connect to MYSQL through PHP

From Dev

Can't connect to server through infiniband

From Dev

Can't Connect To Apache Through External Network

From Dev

Can only connect through localhost and not with IP

From Dev

You can't change configuration 'providedRuntime' because it is already resolved

From Dev

MongoDB replica set configuration through js file

From Dev

Set host through boto configuration file

Related Related

  1. 1

    IIS Express - 500.19 Cannot read configuration file - because it's looking at the wrong path

  2. 2

    Mounting a remote file system (sshfs) through an intermediate machine

  3. 3

    cmake can't find boost libraries because it looks for the wrong file names

  4. 4

    cmake can't find boost libraries because it looks for the wrong file names

  5. 5

    How can I view all the folders currently mounted through sshfs?

  6. 6

    I can't use the shutdown command because the system "Failes to Connect to bus: No such file or directory"

  7. 7

    Wrong permissions on configuration file of phpmyadmin

  8. 8

    Cannot connect to wifi, but can connect through wire

  9. 9

    SSHFS/SFTP : Vim hangs when trying to edit file over sshfs and can't upload file over MTU size over sftp

  10. 10

    How to Change /var/ File Permission When I Can't Connect to the server through Filezilla or Putty

  11. 11

    Cannot Read Configuration File Because it Exceeds the Maximum File Size

  12. 12

    Connect to remote socket via sshfs

  13. 13

    Sshfs as regular user through fstab

  14. 14

    Freepbx can't connect to asterisk wrong password

  15. 15

    win-sshfs "Server HMAC algorithms not found" Can't connect to server

  16. 16

    sshfs - No such file or directory

  17. 17

    sshfs 'no such file' error

  18. 18

    What's wrong with this configuration of sudoers file?

  19. 19

    Web configuration file being accessed in the wrong folder

  20. 20

    Puma server receiving a connection refused because it cannot connect to the socket file

  21. 21

    DACPAC won't deploy because 'can't connect to server'?

  22. 22

    Can't Connect to Elasticsearch (through Curl)

  23. 23

    Can't connect to MYSQL through PHP

  24. 24

    Can't connect to server through infiniband

  25. 25

    Can't Connect To Apache Through External Network

  26. 26

    Can only connect through localhost and not with IP

  27. 27

    You can't change configuration 'providedRuntime' because it is already resolved

  28. 28

    MongoDB replica set configuration through js file

  29. 29

    Set host through boto configuration file

HotTag

Archive