Easiest way to setup is probably installing Git Bash
:
More instructions can be found here.
c:\Windows\System32\Drivers\etc\hosts
https://superuser.com/q/487402/273113
apt install openssh-server
service ssh status
Check/change settings:
cat /etc/ssh/sshd_config
service ssh restart
ssh-keygen -t rsa -C "[email protected]"
Add your key to host for user to enable a keyed or passwordless login
ssh-copy-id user@host
ssh-copy-id
is (about) equivalent to the following steps:
Local:
scp ~/.ssh/id_rsa.pub [email protected]:
ssh [email protected]
Remote:
cat id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
rm -f id_rsa.pub
To connect
- ssh user@host – connect to host as user
- ssh -p port user@host – connect to host on port port as user
$ eval `ssh-agent -s`
$ ssh-add
$ ssh-add -l
$ ssh-add -D
I tried this method: add private key permanently ,but seems I still need to run ssh add, to add the passphrase, everytime I open a new terminal, I'm not sure if this is by design for security reason. Someone suggeted gnome-keyring
may provide funtionalities to remember passphrase between reboots.
ssh-keygen -R 192.168.3.10
https://stackoverflow.com/a/23150466/646732
ssh -tt root@$remote_server_ip << EOF
echo "Running installation script..."
source install_scripts_only/install.sh
EOF
https://stackoverflow.com/a/26436163/646732
So you don't have to remember host ip.
echo "10.0.2.203 miranda-vm # testing VM" >> /etc/hosts
https://support.rackspace.com/how-to/modify-your-hosts-file/
for example, you can also add comments:
10.0.2.203 miranda-vm # testing VM
10.0.2.96 midpoint-dev # MidPoint server
10.0.2.98 jellyfish-dev # Jellyfish dev server
ssh -v root@miranda-vm
To something easily recognizable:
hostnamectl set-hostname 'miranda-vm'
Need to exit then login to see change taking effect.
https://askubuntu.com/questions/9540/how-do-i-change-the-computer-name