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 [email protected]

I still get prompted for [email protected] 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
2
  • 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
    Commented Mar 15, 2016 at 14:29
  • That seems to help. I'm getting a new error now, which I've added to the OP.
    – zundarz
    Commented Mar 15, 2016 at 16:39

1 Answer 1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .