ssh successful but not scp? why?
3,822
This error shows you couldn't connect to the server. That can have many reasons:
- a firewall blocking incoming connections to your server
- a firewall blocking outgoing connections from your computer
- ssh daemon on the server configured to listen on a non-standard port
- stopped ssh daemon
Since you can transfer files from your other computer I'd say you probably have a firewall blocking the connection. By the way... I supposed this host "test" is just a hypothetical example you used. Note it's IP address is not a valid local address (11.22.33.44), so if this message is real you should try using the server's IP address in place of "test".
Related videos on Youtube
Author by
Lex Ushakov
Updated on September 18, 2022Comments
-
Lex Ushakov over 1 year
I'm trying to center table vertically and horizontally via
flexbox
.One "screen" - one table in the middle, scrolling, - yet another table in the middle.
But via this code doesn't work:
* { margin : 0; padding : 0; } table { text-align : center; } thead { font-weight : bold; background : forestgreen; } tfoot { font-weight : bold; background : tomato; } th, td { width : 5vw; } body { min-height : 100vh; display: flex; align-items: center; justify-content: center; } .wrapper { min-height : 100vh; }
<body> <div class="wrapper"> <table> <thead> <tj> <th>1</th> <th>1</th> <th>1</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>2</td> <td>2</td> </tr> <tr> <td>3</td> <td>3</td> <td>3</td> </tr> <tr> <td>4</td> <td>4</td> <td>4</td> </tr> </tbody> <tfoot> <tr> <td>5</td> <td>5</td> <td>5</td> </tr> </tfoot> </table> </div><!-- wrapper end --> <div class="wrapper"> <table> <thead> <tj> <th>1</th> <th>1</th> <th>1</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>2</td> <td>2</td> </tr> <tr> <td>3</td> <td>3</td> <td>3</td> </tr> <tr> <td>4</td> <td>4</td> <td>4</td> </tr> </tbody> <tfoot> <tr> <td>5</td> <td>5</td> <td>5</td> </tr> </tfoot> </table> <div><!-- wrapper end --> </body>
Where I'm wrong?
-
Claudio almost 12 yearsIs this question mark really part of your command line or is it just a typo? (here:
$ ssh -vvv test [email protected]:~/?
) -
Zoredache almost 12 yearsCan you ping the IP address of the server? Can you run a trace route to it?
-
-
tough almost 12 yearsI agree that IP is just some numbers instead of the actual IP, ssh daemon on the server configured to listen to the non standard port ! "I was able to ´scp´ from my laptop with same config in server." yes I can ping to the server, its ok with 0 packet loss. Question mark was part of the command which resulted the output files above. I saw it in some posts and used it did not know exactly what it does.
-
Claudio almost 12 yearsIf the server is configured to listen on a non-standard port you have to specify it on the command line. Suppose the port you are using is 2222. Then you should use this for ssh:
ssh -p2222 user@server
. Note that for scp the switch is aP
instead ofp
:scp -P2222 file user@server:~/directory
(supposingdirectory
is under your homedir). -
tough almost 12 yearsNow it seems that I can log in with ssh and do scp as well, don know what changes caused this. but it works, as far as i know my commands were not correct.
-
Claudio almost 12 years@tough, if you post the commands you used for connecting successfully I can explain you why they worked.
-
tough almost 12 years
$ scp -v ~\.ssh\id_rsa.pub [email protected]:~/temp/
this worked. where temp is my folder where I store most of the sent files to process it later in server. The initial command were different which I tried trying different parameters which I do not remember correctly. seemed simple, later on but it was stupidity of me not to get the commands rights for this easy looking job as well. I am completely new to this so, I am sorry bothering so many of you. I don know most of the time I stuck with small problems, and in the office there is no one to guide me, still lots to learn. -
Claudio almost 12 yearsJust in case, linux commands usually have a comprehensive help you can access by typing
man
followed by the command in question (eg.man ssh
). Very useful to check out which options you can use with a given command, and you can learn a lot reading it. Just in case, you can always post here too. That's the point of the site, helping solving problems, specially when it can benefit other people too. Since you're new here, if you consider my answer helped you solve this problem you can help me too by checking the big checkmark to make it your chosen answer. -
Lex Ushakov almost 7 yearsThanks for your reply, but, why using
flexbox
inbody
and.wrapper
differs? -
Asons almost 7 years@LexUshakov Because
display: flex
only work one level down, so in your case thewrapper
's became flex row items, not thetable
's. If you add a border to thewrapper
in your original code, you'll see how they render and likely also understand why