Skip to content

Commit 795ebd2

Browse files
committed
ssh config
1 parent d4e08af commit 795ebd2

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.ci/setup_ssh_config.sh

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@
22

33
set -exu
44

5-
whoami
5+
sudo apt-get upgrade
6+
sudo apt-get update
7+
sudo apt-get install openssh-server
8+
sudo service ssh start
69

7-
which ssh
10+
mkdir -p ~/.ssh
11+
cd ~/.ssh
12+
ssh-keygen -q -t rsa -N "" -f jsch
13+
cat jsch.pub >> authorized_keys
14+
chmod 640 authorized_keys
15+
sudo service ssh restart
816

9-
ls -lsa ~/.ssh
17+
cat <<EOT >> config
18+
Host junit-host
19+
HostName localhost
20+
StrictHostKeyChecking no
21+
IdentityFile ~/.ssh/jsch
22+
PreferredAuthentications publickey
23+
EOT
1024

11-
ssh localhost
12-
13-
exit 1
25+
ssh -q junit-host exit
1426

0 commit comments

Comments
 (0)