LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2019, 05:48 PM   #1
airsine
LQ Newbie
 
Registered: Jan 2019
Posts: 2

Rep: Reputation: 0
openssh-sftp-client - 7.6p1-1


I've just installed openssh-sftp-client - 7.6p1-1 and for whatever reason I cannot sftp to ANYTHING even though it show it is installed and its apparently a command.

I can SSH fine just no SFTP


[/] # !180
opkg list-installed
entware-opt - 222108-5
findutils - 4.6.0-1
ldconfig - 2.23-6
libc - 2.23-6
libgcc - 6.3.0-6
libopenssl - 1.0.2n-1
libpthread - 2.23-6
librt - 2.23-6
libssp - 6.3.0-6
libstdcpp - 6.3.0-6
locales - 2.23-6
openssh-sftp-client - 7.6p1-1
opkg - 2011-04-08-9c97d5ec-17a
terminfo - 6.0-1c
zlib - 1.2.11-1

[/] # sftp
usage: sftp [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
[-o ssh_option] [-P port] [-R num_requests] [-S program]
[-s subsystem | sftp_server] host
sftp [user@]host[:file ...]
sftp [user@]host[:dir[/]]
sftp -b batchfile [user@]host


[/] # ssh root@10.1.1.2
The authenticity of host '10.1.1.2 (10.1.1.2)' can't be established.
ECDSA key fingerprint is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.1.2' (ECDSA) to the list of known hosts.
root@10.1.1.2's password:
Linux XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jan 15 14:07:43 2019 from 172.27.224.9
root@zotac:~#

But........................

[/] # sftp root@10.1.1.2
exec: /opt/bin/ssh: No such file or directory
Connection closed

Any help would be appreciated.

thx

Mike
 
Old 01-16-2019, 08:13 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,824

Rep: Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775
Quote:
Originally Posted by airsine View Post
I've just installed openssh-sftp-client - 7.6p1-1 and for whatever reason I cannot sftp to ANYTHING even though it show it is installed and its apparently a command. I can SSH fine just no SFTP
Code:
[/] # !180
opkg list-installed
entware-opt - 222108-5
findutils - 4.6.0-1
ldconfig - 2.23-6
libc - 2.23-6
libgcc - 6.3.0-6
libopenssl - 1.0.2n-1
libpthread - 2.23-6
librt - 2.23-6
libssp - 6.3.0-6
libstdcpp - 6.3.0-6
locales - 2.23-6
openssh-sftp-client - 7.6p1-1
opkg - 2011-04-08-9c97d5ec-17a
terminfo - 6.0-1c
zlib - 1.2.11-1

[/] # sftp
usage: sftp [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
          [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
          [-o ssh_option] [-P port] [-R num_requests] [-S program]
          [-s subsystem | sftp_server] host
       sftp [user@]host[:file ...]
       sftp [user@]host[:dir[/]]
       sftp -b batchfile [user@]host


[/] # ssh root@10.1.1.2
The authenticity of host '10.1.1.2 (10.1.1.2)' can't be established.
ECDSA key fingerprint is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.1.2' (ECDSA) to the list of known hosts.
root@10.1.1.2's password:
Linux XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jan 15 14:07:43 2019 from 172.27.224.9
root@zotac:~#
But........................
Code:
[/] # sftp root@10.1.1.2
exec: /opt/bin/ssh: No such file or directory
Connection closed
Any help would be appreciated.

thx

Mike
Please don't use text speak; see the LQ Rules. And I've bolded a couple of items in what you posted for emphasis only; you're using Kali? You've read the forum sticky-posts about Kali Linux, and Kali's own website, where they specifically tell you that it's for advanced Linux users, and even then only for security/pentesting, and NOT for daily use??

Past the very-obvious things (such as don't use Kali, and don't EVER log in as root over the network), it would appear that you either don't have the sftp environment set up correctly in your sshd_config file, and it's looking for the sub-system to use. In this case, /opt/bin/ssh, and it's not finding it. So either you have sftp turned off on your system, haven't configured it correctly, or are trying to chroot things and THAT is not set up correctly. Without seeing your sshd_config file, no way of knowing.

And be aware that Kali, by default, does LOTS of different things with services/network security that are not standard, which could ALSO be the cause of your issues...which is why Kali isn't recommended for anyone to use for daily-use, even from their own website:
https://docs.kali.org/introduction/s...use-kali-linux
 
1 members found this post helpful.
Old 01-16-2019, 08:35 AM   #3
l0f4r0
Member
 
Registered: Jul 2018
Location: Paris
Distribution: Debian
Posts: 852

Rep: Reputation: 286Reputation: 286Reputation: 286
...and please use [CODE] tags ("#" button in Go Advanced edition)
 
1 members found this post helpful.
Old 01-16-2019, 10:50 AM   #4
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 899

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Quote:
Originally Posted by airsine View Post
[B]I've just installed openssh-sftp-client - 7.6p1-1 and for whatever reason I cannot sftp to ANYTHING even though it show it is installed and its apparently a command.
sftp client is handled as an internal sub-system by the sshd daemon, so
Code:
a) the sshd daemon must be installed and running on the server
b) in /etc/ssh/sshd_config the sftp client must be specified with option
   Subsystem sftp <path/to/client>
 
1 members found this post helpful.
Old 01-16-2019, 11:07 AM   #5
airsine
LQ Newbie
 
Registered: Jan 2019
Posts: 2

Original Poster
Rep: Reputation: 0
SFTP

I appreciate the quick response and forgive my discrepancy for not using code tags. The box in question is a generic Linux box going TO a Kali box. This is in a closed lab environment of 5 Linux boxes, hence the "ROOT" account (again, forgive my remedial pasting). The SFTP daemon on Kali works fine I just chose to paste the results from that one. Its the generic box that I need to edit the /etc/ssh/sshd_configs as 'ehartman' and 'TB0ne' has specified.

I'll do that and hopefully that should do it.

Thank You both for your assistance.
 
Old 01-16-2019, 01:24 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,824

Rep: Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775Reputation: 5775
Quote:
Originally Posted by airsine View Post
I appreciate the quick response and forgive my discrepancy for not using code tags. The box in question is a generic Linux box going TO a Kali box. This is in a closed lab environment of 5 Linux boxes, hence the "ROOT" account (again, forgive my remedial pasting). The SFTP daemon on Kali works fine I just chose to paste the results from that one. Its the generic box that I need to edit the /etc/ssh/sshd_configs as 'ehartman' and 'TB0ne' has specified.
You really need to take some advice you've been given, here.

If you're just starting out, you need to IMMEDIATELY break yourself of the habit of doing ANYTHING as root, unless it's absolutely necessary. And you need to get into the habit of using proper security...root logins are bad enough, but over the network is even worse. And you ALSO need to not use Kali, period. There is **ABSOLUTELY NO REASON** to use it, unless you are, again:
  • And experienced/advanced Linux user
  • Who is only using it for security testing purposes
Period. There is nothing that Kali does that any distro of Linux can't do...it just has pre-configured settings. If you're doing this to get experience, you're not going to get all you can out of it, since Kali does NOT function like any 'regular' distro does. Trying to apply those things later will just make things more difficult, since you learned bad habits from the beginning.

Your system, do what you want of course...but you're just setting yourself up for problems later.
 
2 members found this post helpful.
Old 01-16-2019, 01:41 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,307
Blog Entries: 9

Rep: Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309Reputation: 3309
Quote:
Originally Posted by airsine View Post
I've just installed openssh-sftp-client - 7.6p1-1 and for whatever reason I cannot sftp to ANYTHING even though it show it is installed and its apparently a command.

I can SSH fine just no SFTP


[/] # !180
opkg list-installed
entware-opt - 222108-5
findutils - 4.6.0-1
ldconfig - 2.23-6
libc - 2.23-6
libgcc - 6.3.0-6
libopenssl - 1.0.2n-1
libpthread - 2.23-6
librt - 2.23-6
libssp - 6.3.0-6
libstdcpp - 6.3.0-6
locales - 2.23-6
openssh-sftp-client - 7.6p1-1
opkg - 2011-04-08-9c97d5ec-17a
terminfo - 6.0-1c
zlib - 1.2.11-1

[/] # sftp
usage: sftp [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
[-o ssh_option] [-P port] [-R num_requests] [-S program]
[-s subsystem | sftp_server] host
sftp [user@]host[:file ...]
sftp [user@]host[:dir[/]]
sftp -b batchfile [user@]host


[/] # ssh root@10.1.1.2
The authenticity of host '10.1.1.2 (10.1.1.2)' can't be established.
ECDSA key fingerprint is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.1.2' (ECDSA) to the list of known hosts.
root@10.1.1.2's password:
Linux XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jan 15 14:07:43 2019 from 172.27.224.9
root@zotac:~#

But........................

[/] # sftp root@10.1.1.2
exec: /opt/bin/ssh: No such file or directory
Connection closed

Any help would be appreciated.

thx

Mike
i cannot make ANY sense out of this.
please take some time to formulate a technical problem description, provide initial troubleshooting steps etc, and clearly mark code as such.
the first link in my signature might help.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure error when installing openSSH-6.6p1 in BLFS Carl_cj Linux From Scratch 2 09-25-2014 08:37 AM
[SOLVED] openssh-6.6p1 does not create ed25519 host key file lems Slackware 2 03-29-2014 09:40 AM
SFTP logging for Chroot on CentOS 6.2 with openssh-5.3 not working (internal-sftp) RatherBFishin Linux - Server 1 08-30-2012 06:45 PM
openssh-3.6p1 configure zlib error fredward Linux - Newbie 5 12-22-2008 05:44 AM
Start OpenSSH-4.6p1 On Boot in Mandriva 2006 seanh1986 Linux - Newbie 1 07-05-2007 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration