LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-19-2007, 01:37 AM   #1
linderox
LQ Newbie
 
Registered: Apr 2007
Posts: 29

Rep: Reputation: 15
scp and ssh


i can't copy from server by scp,but ssh works well

Code:
$ssh server
password:******
> #ok
а вот так ...
Code:
$scp -r server:/home/user localhost:/home/user
passwd:******
/home/user/.bashrc: line 18: [: : integer expression expected
ssh: connect to host localhost port 22: Connection refused
lost connection
а вот вам
/home/user/.bashrc
Code:
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"пт
 
Old 11-19-2007, 01:57 AM   #2
lodder
LQ Newbie
 
Registered: Jun 2004
Location: Belgium
Distribution: Debian
Posts: 24

Rep: Reputation: 15
Quote:
Originally Posted by linderox View Post
Code:
$scp -r server:/home/user localhost:/home/user
passwd:******
/home/user/.bashrc: line 18: [: : integer expression expected
ssh: connect to host localhost port 22: Connection refused
lost connection
This means your ssh service isn't running on localhost or something is blocking ports you need to check ether with nmap or with netstat if ssh service on localhost is running
 
Old 11-19-2007, 02:04 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
Code:
/home/user/.bashrc: line 18: [: : integer expression expected
The above error is from the local .bashrc file. I think you don't really need to specify localhost on the scp command line: this will invoke another shell. Why not simply...?
Code:
scp -r server:/home/user /home/user
 
  


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
allow ssh, scp and sftp? javier_ccs Linux - Newbie 6 09-12-2006 08:11 AM
ssh scp question shanenin Linux - Networking 3 10-14-2004 12:26 AM
scp ssh (easier way) podollb Linux - Software 8 03-21-2004 11:56 PM
difference between SSH and SCP palanisaravanan Linux - Security 8 12-28-2003 11:07 PM
ssh scp problem ckupris Linux - Networking 6 10-11-2003 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:46 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