summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-02-04 16:03:06 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-02-04 16:03:06 +0100
commit68594bd6e16253d2f2977a4ab46713386e2482bd (patch)
tree144cf8466f709f8ac2947d7f03401aeecb5c9a93 /mcp
parentc2ea7deba73e335ace30eba1db7e2f80d3c1daed (diff)
[cfg01] Use ssh config to set default user & key
Change-Id: I7486569568207f7652f8bdfcf1060ce51a9dbb0e Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp')
-rwxr-xr-xmcp/scripts/docker-compose/files/entrypoint.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/mcp/scripts/docker-compose/files/entrypoint.sh b/mcp/scripts/docker-compose/files/entrypoint.sh
index eb549bc28..9830ea15f 100755
--- a/mcp/scripts/docker-compose/files/entrypoint.sh
+++ b/mcp/scripts/docker-compose/files/entrypoint.sh
@@ -16,6 +16,9 @@ fi
if [ ! -f /home/ubuntu/.ssh/authorized_keys ]; then
install -D -o ubuntu /root/fuel/mcp/scripts/mcp.rsa.pub \
/home/ubuntu/.ssh/authorized_keys
+ mkdir -p /root/.ssh/
+ echo 'User ubuntu' > /root/.ssh/config
+ echo 'IdentityFile /root/fuel/mcp/scripts/mcp.rsa' >> /root/.ssh/config
fi
if ! grep -q localhost /etc/hosts; then
ref='#n170'>170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265