Posts Tagged ‘SSH’

SSH strange error: Host key verification failed

Today we came across a quite uncommon error with SSH. The error actually happened when trying to clone a github repository. When trying to connect to the remote server, we were getting “Host key verification failed.”. The SSH keys were there, but the connection was dying.

The problem was solved when adding the remote server’s key to the .ssh/known_hosts file, but why didn’t ssh add the key to this file automatically as it always does? Well, this was happening inside a CHROOT environment, so more debugging was needed.

After running the ssh git@github.com command with strace, we noticed that the /dev/tty device file did not exist, and the ssh commands could not prompt us to confirm that we wanted to add the key to the known_hosts file. The solution was quite simple, copy the /dev/tty device file to the dev directory of the CHROOT environment. After this, everything worked as expected.

Tags: , , ,

02

08 2010

Setting up sftp in Dreamweaver using a specific sftp port

SFTP stands for SSH File Transfer Protocol and it uses the SSH protocol to reliably and securely transfer files. While using sftp on Dreamweaver is not too complicated, setting it up to use a specific port is not well documented. SFTP uses the same port as SSH, the default port is 22 but it is not uncommon that you will be assigned a custom port as this is a standard practice to avoid brute force SSH scanning.

Setting up SFTP on Dreamweaver

Open up the sites manager and choose to setup a new site.

sftp dreamweaver 1

Proceed to setup the site as you normally would any other site on Dreamweaver. Once you get to the “remote setup” you will need to define the port number. The default port for sftp in Dreamweaver is port 22. If you select you want to use sftp and do not define the port number, Dreamweaver will automatically try to use port 22. To use an alternate port you must define it in the FTP Host field like this ” hostname:portnumber “. So if I want to access files on example.com using port 21324 I would put in the FTP host field example.com:21324

Setting up sftp using dreamweaver

Once you are done, click on test connection to verify if everything is working correctly.

29

11 2009