-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenablessh.txt
More file actions
34 lines (14 loc) · 848 Bytes
/
enablessh.txt
File metadata and controls
34 lines (14 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
chmod +w /etc/ssh/sshd_config
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
sed -i "s/#PermitEmptyPasswords no/PermitEmptyPasswords yes/" /etc/ssh/sshd_config
sed -i "s/#PubkeyAuthentication yes/PubkeyAuthentication yes/" /etc/ssh/sshd_config
echo "AcceptEnv *" >> /etc/ssh/sshd_config
echo "PermitUserEnvironment yes" >> /etc/ssh/sshd_config
mkdir -p ~/.ssh
chmod -R 600 ~/.ssh
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ""
echo "StrictHostKeyChecking=accept-new" >>~/.ssh/config
echo "PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/local/sbin:/usr/local/bin" >>~/.ssh/environment
echo "PKG_PATH=http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f 1,2 -d.)/All/" >>~/.ssh/environment
chmod -w /etc/ssh/sshd_config
service sshd restart