Hi,
I have make a file ~/.ssh/config with the following content
Host mhub
Hostname 192.168.0.22
User root
IdentityFile ~/.ssh/id_rsa.pub
and copied all files of ~/.ssh to the Pi /root/.ssh and/or ~/.ssh
In anycase after ssh mhub I had to type the password.
What I have done wrong?
ssh login mit IdentityFile
Moderator: Mattk
- YJB
- Platinum Boarder
- Posts: 387
- Joined: Thu Feb 19, 2009 5:53 pm
- Location: Venhuizen, Netherlands
- Contact:
Re: ssh login mit IdentityFile
Hi,
I have no specific knowledge on the PI, but I do know a bit about ssh.
You will need to copy the contents of the pub key (that was generated on the source system) into the authorized_keys file on the PI. This is the line that starts with "ssh-rsa AAAAB3"
Make sure that the authorized_keys has 600 permissions.
Ysbrand
I have no specific knowledge on the PI, but I do know a bit about ssh.
You will need to copy the contents of the pub key (that was generated on the source system) into the authorized_keys file on the PI. This is the line that starts with "ssh-rsa AAAAB3"
Make sure that the authorized_keys has 600 permissions.
Ysbrand
-
- Junior Boarder
- Posts: 34
- Joined: Sun Jun 29, 2014 11:09 pm
- Location: 83570 Carces France
- Contact:
Re: ssh login mit IdentityFile
Hi Ysbrand,
I have made your suggestions without succes. Here the output of ssh -v
OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /home/pu/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.22 [192.168.0.22] port 22.
debug1: Connection established.
debug1: identity file /home/pu/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pu/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u2
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u2 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64@openssh.com none
debug1: kex: client->server aes128-ctr umac-64@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA de:80:d1:e7:70:e9:a9:95:d0:54:90:1f:ad:47:60:85
debug1: Host '192.168.0.22' is known and matches the ECDSA host key.
debug1: Found key in /home/pu/.ssh/known_hosts:6
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/pu/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
perhaps you find my fault.
I have made your suggestions without succes. Here the output of ssh -v
OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /home/pu/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.22 [192.168.0.22] port 22.
debug1: Connection established.
debug1: identity file /home/pu/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/pu/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u2
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u2 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64@openssh.com none
debug1: kex: client->server aes128-ctr umac-64@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA de:80:d1:e7:70:e9:a9:95:d0:54:90:1f:ad:47:60:85
debug1: Host '192.168.0.22' is known and matches the ECDSA host key.
debug1: Found key in /home/pu/.ssh/known_hosts:6
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/pu/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
perhaps you find my fault.
- YJB
- Platinum Boarder
- Posts: 387
- Joined: Thu Feb 19, 2009 5:53 pm
- Location: Venhuizen, Netherlands
- Contact:
Re: ssh login mit IdentityFile
Not sure if the following has been set in etc/ssh/sshd_config
HostbasedAuthentication yes
HostbasedAuthentication yes
-
- Junior Boarder
- Posts: 34
- Joined: Sun Jun 29, 2014 11:09 pm
- Location: 83570 Carces France
- Contact:
Re: ssh login mit IdentityFile [solved]
The content of the public key ~/.ssh/id_dsa.pub of the Home-PC
I copied into the file of the meteohub server
/root/.ssh/authorized_keys
Now when I type in the Home-PC (konsole) "ssh mhub" I logged in without any PW.
further I change in the ~/.ssh/config file
IdentityFile ~/.ssh/id_rsa.pub in
IdentityFile ~/.ssh/id_rsa
I copied into the file of the meteohub server
/root/.ssh/authorized_keys
Now when I type in the Home-PC (konsole) "ssh mhub" I logged in without any PW.
further I change in the ~/.ssh/config file
IdentityFile ~/.ssh/id_rsa.pub in
IdentityFile ~/.ssh/id_rsa