edit $ cat /etc/environment
add:
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts
April 26, 2020
January 23, 2016
SSH server on MacOS
Enable ssh login
From command-line
Restrict access to ssh only to admin
# Create the com.apple.access_ssh group
dseditgroup -o create -q com.apple.access_ssh
# Add the admin group to com.apple.access_ssh
dseditgroup -o edit -a admin -t group com.apple.access_ssh
From command-line
systemsetup -setremotelogin on
Restrict access to ssh only to admin
# Create the com.apple.access_ssh group
dseditgroup -o create -q com.apple.access_ssh
# Add the admin group to com.apple.access_ssh
dseditgroup -o edit -a admin -t group com.apple.access_ssh
ssh login without password via id_rsa
machine A - client
machine B - server
on A run
Result:
ls ~/.ssh
you should see the id_rsa & id_rsa.pub files
login via ssh to B
ssh username@machine_ip
promt for password - type in your password
ls ~/.ssh
if directory does not exist - create it
mkdir ~/.ssh
if directory exists - log out
on A
let's copy the id_rsa.pub key to remote server B
cat .ssh/id_rsa.pub | ssh username@machine_b_ip 'cat >> .ssh/authorized_keys'
promt for password - type in your password
we are almost done. From now you can login to remote machine without password promt. But we need to take some security providing steps.
from A let's login to B
ssh username@machine_b_ip
No password promt. You have been loged in to remote server 2.
Please apply
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
machine B - server
on A run
ssh-keygen -t rsaif asked to provide password just press ENTER
Result:
ls ~/.ssh
you should see the id_rsa & id_rsa.pub files
login via ssh to B
ssh username@machine_ip
promt for password - type in your password
ls ~/.ssh
if directory does not exist - create it
mkdir ~/.ssh
if directory exists - log out
on A
let's copy the id_rsa.pub key to remote server B
cat .ssh/id_rsa.pub | ssh username@machine_b_ip 'cat >> .ssh/authorized_keys'
promt for password - type in your password
we are almost done. From now you can login to remote machine without password promt. But we need to take some security providing steps.
from A let's login to B
ssh username@machine_b_ip
No password promt. You have been loged in to remote server 2.
Please apply
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Subscribe to:
Posts (Atom)
How to type letters with accent
Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/
-
Для того чтобы изменить сервер обновлений или подключить локальную папку зеркала необходимо - открыть реестр и в соответствующих ветках пр...
-
replaced ukrainian "І" with ukrainian "И" https://drive.google.com/drive/folders/1G034a_BPxs0YVFWivjGZjeAyj-jefYNJ if yo...
-
plugins are for eap are missing: apt-get install strongswan-plugin-eap-mschapv2