Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/fixssh into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 257
Merged at revision: 264
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/fixssh
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 18 lines (+5/-1)
1 file modified
share/qtcreator/ubuntu/scripts/openssh_publickey (+5/-1)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/fixssh
Reviewer Review Type Date Requested Status
Zoltan Balogh Approve
Review via email: mp+234467@code.launchpad.net

Commit message

Make sure .ssh folder and authorized_keys2 file have the correct owner and permissions

Description of the change

Make sure .ssh folder and authorized_keys2 file have the correct owner and permissions

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/ubuntu/scripts/openssh_publickey'
2--- share/qtcreator/ubuntu/scripts/openssh_publickey 2014-08-15 11:06:04 +0000
3+++ share/qtcreator/ubuntu/scripts/openssh_publickey 2014-09-12 13:32:45 +0000
4@@ -46,9 +46,13 @@
5 echo "Deploy the host key to the device.."
6 KEY=`cat $SSHIDENTITY.pub`
7 adb_shell "mkdir -p /home/$USERNAME/.ssh"
8- echo "..key folder created"
9+ echo "..key folder created!"
10 adb_shell "echo $KEY >> /home/$USERNAME/.ssh/authorized_keys2"
11 echo "..key deployed!"
12+ adb_shell "chown -R $USERNAME:$USERNAME /home/$USERNAME/.ssh"
13+ adb_shell "chmod 0700 /home/$USERNAME/.ssh"
14+ adb_shell "chmod 0600 /home/$USERNAME/.ssh/authorized_keys2"
15+ echo "..permissions updated!"
16 }
17
18 function generate_key {

Subscribers

People subscribed via source and target branches