Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or directory

12,804 views
Skip to first unread message

sarangzigi

unread,
Dec 17, 2007, 5:49:57 AM12/17/07
to
I install rwsync server on xp, and on fedora tried to ssh as follows;

1) on fedora
ssh-keygen -P "" -f ~/.ssh/id_rsa

chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa

ftp id_rsa.pub to xp

2) on xp

append id_rsa.pub to /cwRsyncServer/var/SvcwRsync/.ssh/
authorized_keys2

3) and on fedora

ssh -i ~/.ssh/id_rsa i...@192.168.0.3

then I got this error message.

"Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or
directory."

My sshd_config on xp is as follows::

#Port 22
Protocol 2,1
#Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
#HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh_host_rsa_key
HostKey /etc/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
# PermitRootLogin no

# The following setting overrides permission checks on host key files
# and directories. For security reasons set this to "yes" when running
# NT/W2K, NTFS and CYGWIN=ntsec.
StrictModes no

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys2

# For this to work you will also need host keys in /etc/ssh/
ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication yes
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
IgnoreUserKnownHosts yes
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no

# Change to no to disable s/key passwords
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-
response)
# and session processing. Depending on your PAM configuration, this
may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
MaxStartups 10:30:60

# default banner path
Banner /etc/banner.txt

# override default of no subsystems
Subsystem sftp /usr/sbin/sftp-server


And, /var/log/OpenSSHServer.log is

/etc/sshd_config line 16: garbage at end of line; "protocol".
/etc/sshd_config line 16: garbage at end of line; "protocol".
/etc/sshd_config line 16: garbage at end of line; "protocol".
/etc/sshd_config line 16: garbage at end of line; "protocol".
/etc/sshd_config line 16: garbage at end of line; "protocol".
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key

Why do I get this error mesage?

"Warning: Identity file ~/.ssh/id_rsa not accessible: No such file or
directory."

Is there errors on sshd_config?

M'vy

unread,
Dec 17, 2007, 7:38:57 AM12/17/07
to

> And, /var/log/OpenSSHServer.log is
>
> /etc/sshd_config line 16: garbage at end of line; "protocol".
> /etc/sshd_config line 16: garbage at end of line; "protocol".
> /etc/sshd_config line 16: garbage at end of line; "protocol".
> /etc/sshd_config line 16: garbage at end of line; "protocol".
> /etc/sshd_config line 16: garbage at end of line; "protocol".
> Could not load host key: /etc/ssh/ssh_host_rsa_key
> Could not load host key: /etc/ssh/ssh_host_dsa_key
> Disabling protocol version 1. Could not load host key
> Could not load host key: /etc/ssh/ssh_host_rsa_key
> Could not load host key: /etc/ssh/ssh_host_dsa_key
> Disabling protocol version 1. Could not load host key
> Could not load host key: /etc/ssh/ssh_host_rsa_key
> Could not load host key: /etc/ssh/ssh_host_dsa_key
> Disabling protocol version 1. Could not load host key
> Could not load host key: /etc/ssh/ssh_host_rsa_key
> Could not load host key: /etc/ssh/ssh_host_dsa_key
> Disabling protocol version 1. Could not load host key
>

Did you check the permissions on /etc/ssh_host_rsa_key
/etc/ssh_host_dsa_key ?? Or if they exists.

I think it is stange in your config to find both :

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

And

HostKey /etc/ssh_host_rsa_key
HostKey /etc/ssh_host_dsa_key

You can eventually check also /etc/ssh/ssh_config which is the config
file of ssh client. May be you can find some clue about the connection
problem. It may also exist a log of the ssh client... but do not know where.

EnjoY!

sarangzigi

unread,
Dec 17, 2007, 8:13:23 AM12/17/07
to
> EnjoY!- 따온 텍스트 숨기기 -
>
> - 따온 텍스트 보기 -

Thank you, M'vy!!

It's permission problem!

My ssh is working now.

M'vy

unread,
Dec 17, 2007, 12:41:48 PM12/17/07
to
> Thank you, M'vy!!
>
> It's permission problem!
>
> My ssh is working now.

No Problem!

EnjoY!

puneetk...@gmail.com

unread,
Jul 10, 2018, 1:14:11 PM7/10/18
to
Hey, how did you fix this? what permissions did you give to id_rsa? I am getting the same issue.

William Unruh

unread,
Jul 11, 2018, 12:21:40 AM7/11/18
to
You have to make sure that your home directory is not group or other
writeable, and the .ssh directory is not readable writeable or executable by
either group or other and is owned by you. And id_rsa is rw only by user.

drwx------ 2 unruh unruh 4096 Feb 1 19:25 .
drwxr-xr-x 191 unruh unruh 389120 Jul 10 21:18 ..
-rw------- 1 unruh unruh 1675 May 6 2009 id_rsa

puneetk...@gmail.com

unread,
Jul 12, 2018, 9:40:11 AM7/12/18
to
Thanks William!

emma...@gmail.com

unread,
Aug 3, 2018, 10:03:55 PM8/3/18
to
What command do I need to run to make ./ssh/id_rsa accessible, I have been on it for days

William Unruh

unread,
Aug 4, 2018, 12:07:25 AM8/4/18
to
What are the permissions on your files (ls -la .ssh)
Your .ssh drectory should be accessible only by you, your home directory
should be not writeable by anyone but you, and id_rsa should be read/writeable
only by you.

The command to change thing is chmod.

Bit Twister

unread,
Aug 4, 2018, 3:24:18 AM8/4/18
to
On Fri, 3 Aug 2018 19:03:54 -0700 (PDT), emma...@gmail.com wrote:

> What command do I need to run to make ./ssh/id_rsa accessible, I
> have been on it for days

You don't. You send it to the targets you want to log into using the
command ssh-copy-id. crude example:

ssh-copy-id -i ~/.ssh/id_rsa.pub $LOG...@target.node

Richard Kettlewell

unread,
Aug 4, 2018, 3:28:11 AM8/4/18
to
You are responding to a posting from 2007. They are probably not reading
any more.

> what permissions did you give to id_rsa? I am getting the same issue.

You cannot fix ‘no such file or directory’ with permission settings. If
the file doens’t exist then you need to create it.

--
https://www.greenend.org.uk/rjk/

Marc Haber

unread,
Aug 4, 2018, 4:10:46 AM8/4/18
to
Bit Twister <BitTw...@mouse-potato.com> wrote:
>On Fri, 3 Aug 2018 19:03:54 -0700 (PDT), emma...@gmail.com wrote:
>
>> What command do I need to run to make ./ssh/id_rsa accessible, I
>> have been on it for days
>
>You don't. You send it to the targets you want to log into

NO! emmat0616 is talking about the PRIVATE key, no .pub suffix, which
you DONT send ANYWHERE.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " |
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834
0 new messages