595 B
595 B
ssh
For connecting to remote device
ssh user@<host> then type password if no ssh keys setup
non interactively with password
- install sshpaas https://github.com/kevinburke/sshpass for deb sshpass_1.10-0.1_amd64.deb
- use this command
sshpass -p 'mypassword' scp myblogs.7z root@192.168.1.4:/root/projects/static/more secure wayexport SSHPASS='mypassword' sshpass -e scp myblogs.7z root@ 198.12.73.213:/root/projects/static/ unset SSHPASS - for running commands non interactive
ssh user@host "command"