18 lines
No EOL
595 B
Markdown
18 lines
No EOL
595 B
Markdown
ssh
|
|
|
|
For connecting to remote device
|
|
`ssh user@<host>` then type password if no ssh keys setup
|
|
|
|
non interactively with password
|
|
1. install sshpaas https://github.com/kevinburke/sshpass
|
|
for deb [sshpass_1.10-0.1_amd64.deb](../../../_resources/sshpass_1.10-0.1_amd64.deb)
|
|
2. use this command
|
|
`sshpass -p 'mypassword' scp myblogs.7z root@192.168.1.4:/root/projects/static/`
|
|
more secure way
|
|
```sh
|
|
export SSHPASS='mypassword'
|
|
sshpass -e scp myblogs.7z root@ 198.12.73.213:/root/projects/static/
|
|
unset SSHPASS
|
|
```
|
|
3. for running commands non interactive
|
|
`ssh user@host "command"` |