0

This question is similiar, but I'm experiencing the reverse scenario. SFTP works but I'm not yet connected using SSH.

I'm using a config file and I'm able to sftp to remote server. Local machine is on linux and remote server is CentOS.

sftp foobar_remote

config
Host foobar_remote

  HostName foobar.biz
  Port 2222
  User bizz
  IdentityFile local/bizzbuzz/id_rsa

On my local machine, I'm in the same directory as id_rsa

ssh -i id_rsa bizz@foobar.biz

I still get prompted for bizz@foobar.biz password.

After Responding to Comments

I'm using a different key (id_rsa) now, and I no longer get promted for a password. Now, I get the following response

Welcome to foobar.biz
shell request failed on chananel 0
  • 3
    are you sure you use exact same private key ? local/bizzbuzz/id_rsa vs id_rsa ? you may also use ssh -vvv to have a very hairy log session and see which private key was (or wasn't) fetch. – Archemar Mar 15 '16 at 14:29
  • That seems to help. I'm getting a new error now, which I've added to the OP. – zundarz Mar 15 '16 at 16:39
1

sftp and ssh connect to the same sshd. If you can connect with one, you can with the other. The difference is what program sshd invokes, sftp-server(8) or your login shell.

I suspect your login shell is not installed or not allowed on the remote machine. shell request failed sounds a lot like execvp(shell, args) returned an error.

To test, try invoking some other known executable and your shell explicitly,

$ ssh remote /bin/date
$ ssh remote /usr/bin/bash # or whatever

If one works and the other fails, you've isolated your problem.

  • "...or not allowed on the remote machine" The sysadmins have disabled ssh allowing, of the two, only sftp. – zundarz Mar 16 '16 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.