ssh
Can I forward env variables over ssh?
You can, but it requires changing the server configuration. Read the entries for AcceptEnv in sshd_config(5) and SendEnv in ssh_config(5). update: You can also pass them on the command line: ssh foo@host “FOO=foo BAR=bar doz” Regarding security, note than anybody with access to the remote machine will be able to see the environment variables passed … Read more
Unable to negotiate with XX.XXX.XX.XX: no matching host key type found. Their offer: ssh-dss
The recent openssh version deprecated DSA keys by default. You should suggest to your GIT provider to add some reasonable host key. Relying only on DSA is not a good idea. As a workaround, you need to tell your ssh client that you want to accept DSA host keys, as described in the official documentation … Read more
What is the proper way to sudo over ssh?
Another way is to use the -t switch to ssh: ssh -t user@server “sudo script” See man ssh: -t Force pseudo-tty allocation. This can be used to execute arbi- trary screen-based programs on a remote machine, which can be very useful, e.g., when implementing menu services. Multiple -t options force tty allocation, even if ssh … Read more
How to use Sublime over SSH
There are three ways: Use SFTP plugin (commercial) http://wbond.net/sublime_packages/sftp – I personally recommend this, as after settings public SSH keys with passphrase it is safe, easy and worth every penny http://opensourcehacker.com/2012/10/24/ssh-key-and-passwordless-login-basics-for-developers/ Mount the remote as local file system using osxfuse and sshfs as mentioned in the comments. This might be little difficult, depending on OSX … Read more
proper way to sudo over ssh
Another way is to use the -t switch to ssh: ssh -t user@server “sudo script” See man ssh: -t Force pseudo-tty allocation. This can be used to execute arbi- trary screen-based programs on a remote machine, which can be very useful, e.g., when implementing menu services. Multiple -t options force tty allocation, even if ssh … Read more
Vagrant ssh authentication failure
For general information: by default to ssh-connect you may simply use user: vagrant password: vagrant https://www.vagrantup.com/docs/boxes/base.html#quot-vagrant-quot-user First, try: to see what vagrant insecure_private_key is in your machine config $ vagrant ssh-config Example: $ vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2222 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile C:/Users/konst/.vagrant.d/insecure_private_key IdentitiesOnly yes LogLevel FATAL … Read more
Using expect to pass a password to ssh
I always used the “proper” solution, but I used expect in other situations. Here I found following suggestion: #!/usr/local/bin/expect spawn sftp -b cmdFile [email protected] expect “password:” send “shhh!\n”; interact
TortoiseGit with openssh key not authenticating using ssh-agent
No tweaks needed. Just make TortoiseGit point to the same ssh client used by git itself, see the screenshot: This should be C:\Program Files\Git\usr\bin\ssh.exe in latest version of Git as mentioned by Aleksey Kontsevich in the comments.
How to make ssh-add read passphrase from a file?
Depending on your distribution and on the version of ssh-add you may be able or not to use the -p option of ssh-add that reads the passphrase from stdin in this way: cat passfile | ssh-add -p keyfile If this is not working you can use Expect, a Unix tool to make interactive applications non-interactive. … Read more